
6 Nov
2012
6 Nov
'12
11:16 a.m.
BOOST_TEST(a == 0.003, unit_test::percent_tolerance(1e-6) );
...
BOOST_TEST( expr == std::vector<int>{1,2,3,4});
Can combine these constructs to perform floating point tests with tolerance on a collection? That is, BOOST_TEST( expr == std::vector<double>{1,2,3,4}, unit_test::percent_tolerance(1e-6)); I ask because, for my numerics codes, I've kludged together the Test floating point tolerance algorithms to produce something like a BOOST_CHECK_CLOSE_COLLECTIONS. Direct support within Test would be much appreciated. Thanks, Rhys