Boost C++ Libraries: Ticket #7000: Patch let easy mixing auto registered test_suit test cases with manually registred https://svn.boost.org/trac10/ticket/7000 <p> Currently not easy add manually registred test_cases/test_suits in autoreditred test_suits. Main problem in absent way get current test_suit context for register. </p> <p> But this problem easy fixed in suggested patch. With applied patch possible have like code: </p> <p> BOOST_AUTO_TEST_SUITE( <a class="missing wiki">AppTests</a> ) </p> <p> BOOST_AUTO_TEST_SUITE( <a class="missing wiki">AutoAddedTests</a> ) ... BOOST_AUTO_TEST_SUITE_END() </p> <p> BOOST_AUTO_TEST_SUITE( <a class="missing wiki">ManualAddedTests</a> ) </p> <p> static struct <a class="missing wiki">ManualAddedTestsReg</a> { </p> <blockquote> <p> <a class="missing wiki">ManualAddedTestsReg</a>() { </p> </blockquote> <blockquote> <blockquote> <p> current_test_suit().add( BOOST_TEST_CASE( &amp;test_case1 ) ); current_test_suit().add( BOOST_TEST_CASE( &amp;test_case2 ) ); ... </p> </blockquote> <p> } </p> </blockquote> <p> } manualAddedTestsReg; </p> <p> BOOST_AUTO_TEST_SUITE_END() </p> <p> BOOST_AUTO_TEST_SUITE_END() </p> <p> But most usefull case can be if need add different test cases list in some cases dependent from options. For example based at some directory test data files list, etc. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7000 Trac 1.4.3 Vladimir Merzliakov <wanderer@…> Tue, 19 Jun 2012 20:11:57 GMT attachment set https://svn.boost.org/trac10/ticket/7000 https://svn.boost.org/trac10/ticket/7000 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">current_test_suite.patch</span> </li> </ul> <p> Patch </p> Ticket Gennadiy Rozental Mon, 05 Nov 2012 09:03:29 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7000#comment:1 https://svn.boost.org/trac10/ticket/7000#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81193" title="New feature: framework::current_auto_test_suite To be used to manually ...">[81193]</a>) New feature: framework::current_auto_test_suite To be used to manually register test units in a middle of automatically registered test suite Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7000" title="#7000: Patches: Patch let easy mixing auto registered test_suit test cases with ... (closed: fixed)">#7000</a> </p> Ticket