
Gennadiy Rozental
Hi!
When using the boost::test unit-test framework calls like
boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Testing Something" );
test->add(BOOST_TEST_CASE(&test_function_with_expected_error), 1);
lead to an error in return code when used together with VC7 as a post-build step
It shouldn't. Could you provide an example to replicate an error?
I extended a unit_test example file and built a vc7 project. No more gimmicks. Should be reproducable with any of the example files, since the expected error came from stuff like void free_test_function() { BOOST_CHECK( 2 == 1 ); }
Of course I could use runtime argument "--result_code=no", but then how can I make a difference between expected and unexpected errors?
Check "Usage recomendation" section in docs. Use above flag always for post-build event
This makes no sense to me (yet). Sorry if I ask again: Why should I use this flag? I really want my build to _have_ a failure, when the testsuite has an _unexpected_ failure, so I really need --result-code not to be 'no'. OTOH I want my build to succeed in the vicinity of an expected failure, regardless of the value of --result-code. This was the aim of my OP. Yet unsure if I understood the architecture of boost::test ... Markus