Opened 10 years ago
Closed 10 years ago
#7000 closed Patches (fixed)
Patch let easy mixing auto registered test_suit test cases with manually registred
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | To Be Determined | Component: | test |
Version: | Boost 1.50.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
But this problem easy fixed in suggested patch. With applied patch possible have like code:
BOOST_AUTO_TEST_SUITE( AppTests )
BOOST_AUTO_TEST_SUITE( AutoAddedTests ) ... BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE( ManualAddedTests )
static struct ManualAddedTestsReg {
current_test_suit().add( BOOST_TEST_CASE( &test_case1 ) ); current_test_suit().add( BOOST_TEST_CASE( &test_case2 ) ); ...
}
} manualAddedTestsReg;
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()
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.
Attachments (1)
Change History (2)
by , 10 years ago
Attachment: | current_test_suite.patch added |
---|
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch