May 2017
Intermediate to advanced
590 pages
17h 18m
English
The following list shows some of the most commonly used APIs for performing tests:
int a = 2, b = 4; BOOST_TEST(a == b); BOOST_TEST(4.201 == 4.200); std::string s1{ "sample" }; std::string s2{ "text" }; BOOST_TEST(s1 == s2);
BOOST_TEST(4.201 == 4.200, boost::test_tools::tolerance(0.001));
std::vector<int> v{ 1,2,3 }; std::list<short> l{ 1,2,3 }; BOOST_TEST(v == l, boost::test_tools::per_element());
Read now
Unlock full access