
2012/11/6 Gennadiy Rozental <rogeeff@gmail.com>
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.
This is nice. How does this work if I spread my suite across multiple source files? do I need to repeat the decorators in each file? Regards, &rzej