boost.test create test suites aith auto registration
Hi, The documentation says I can use syntax like: BOOST_AUTO_TEST_SUITE( test_suite_name ); // Test cases here BOOST_AUTO_TEST_SUITE_END(); I'm getting no errors, but I find that even when using this, testing errors are reported as being in the master test suite. Sample code: BOOST_AUTO_TEST_SUITE( StringUtility ); BOOST_AUTO_TEST_CASE( getWords ) { // This is only to test functionality of the test library BOOST_CHECK_EQUAL(1, 2); } BOOST_AUTO_TEST_SUITE_END(); Sample output (note that the other test case is from the main file): Running 2 test cases... ./StringUtilityTest.cc(7): error in "getWords": check 1 == 2 failed [1 != 2] *** 1 failure detected in test suite "War" I'd appreciate any help figuring this out. Thanks, Brandon
Brandon Olivares
I’m getting no errors, but I find that even when using this, testing errors are reported as being in the master test suite.
[...]
./StringUtilityTest.cc(7): error in "getWords": check 1 == 2 failed [1 != 2]
*** 1 failure detected in test suite "War"
I guess "War" is the name of your master test suite, right? The master test suite is parent of all test units in your test module. Accordingly any error is attributed to it. The short report only shows the status of the master test suite. If you are interrested with sub test suite actually contains the error use --report_level=detailed. Gennadiy
Hi,
Yes, that is correct about the name of the master suite in my project.
Thank you--I didn't know that.
Thanks,
Brandon
-----Original Message-----
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental
Sent: Wednesday, December 19, 2007 1:38 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] boost.test create test suites aith auto registration
Brandon Olivares
I’m getting no errors, but I find that even when using this, testing errors are reported as being in the master test suite.
[...]
./StringUtilityTest.cc(7): error in "getWords": check 1 == 2 failed [1 != 2]
*** 1 failure detected in test suite "War"
I guess "War" is the name of your master test suite, right? The master test suite is parent of all test units in your test module. Accordingly any error is attributed to it. The short report only shows the status of the master test suite. If you are interrested with sub test suite actually contains the error use --report_level=detailed. Gennadiy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Brandon Olivares
-
Gennadiy Rozental