
6 Nov
2012
6 Nov
'12
1:42 p.m.
Andrzej Krzemienski <akrzemi1 <at> gmail.com> writes:
From the perspective of my usage, I guess it could be set per suite, if this is possible. Per-test would require too much repetition, unless I could define it in my fixture and have the test framework somehow read it from the fixture.
What about interface like this: BOOST_TEST_DECORATORS( + decorator::tolerance(1e-6) ) BOOST_AUTO_TEST_CASE( foo ) { BOOST_TEST( foo == 1.5 ); } BOOST_TEST_DECORATORS( + decorator::percent_tolerance(1e-5) ) BOOST_AUTO_TEST_SUITE(s1) BOOST_AUTO_TEST_CASE( foo ) { BOOST_TEST( foo == 1.5 ); } BOOST_AUTO_TEST_SUITE_END Similar functionality can be implemented using fixture decorator, which already exists. Gennadiy