20 #define BOOST_TEST_DYN_LINK
22 #define BOOST_TEST_MODULE torc
25 #include <boost/test/unit_test.hpp>
63 virtual void useTest(
const boost::unit_test::test_case& inTestCase) {
68 virtual void visit(
const boost::unit_test::test_case& inTestCase) {
71 if(name.find(
"Regression") == string::npos && name.find(
"regression") == string::npos) {
72 std::cout <<
"keeping case " << name << std::endl;
75 inTestCase.p_enabled.set(
false);
76 boost::unit_test::framework::master_test_suite().remove(inTestCase.p_id);
77 std::cout <<
"pruning case " << name << std::endl;
93 inTestSuite.p_enabled.set(
false);
106 virtual void visit(
const boost::unit_test::test_case& inTestCase) {
108 "architecture/iterate_configmaps"
109 "bitstream/VirtexEMapUnitTest"
111 inTestCase.p_enabled.set((enabled.find(inTestCase.p_name.get()) != std::string::npos));
122 boost::unit_test::log_level log_level =
123 boost::unit_test::log_successful_tests
133 boost::unit_test::unit_test_log.set_threshold_level(log_level);
136 char**& argv = boost::unit_test::framework::master_test_suite().argv;
137 int argc = boost::unit_test::framework::master_test_suite().argc;
142 bool regressionRequested =
false;
143 for(
int i = 1; i < argc; i++) {
144 if(argv[i] == regression) {
145 regressionRequested =
true;
156 if(regressionRequested ==
false) {
157 std::cout <<
"NOTE: Disabling all regression tests. Use -regression to enable them."
160 boost::unit_test::traverse_test_tree(boost::unit_test::framework::master_test_suite(),
161 regressionTestFilter);
Test suite visitor to disable regression tests.
bool init_unit_test(void)
Prototype for Boost.Test bool init_unit_test(void).
virtual string getFullyQualifiedPath(void)
Returns the current fully qualified test suite path.
Test suite visitor to disable tests for debugging.
boost::unit_test::test_suite test_suite
Imported type.
virtual void visit(const boost::unit_test::test_case &inTestCase)
Determines whether or not to include the given test case.
Header for the DirectoryTree class.
virtual bool test_suite_start(const boost::unit_test::test_suite &inTestSuite)
Enters a new test suite.
virtual void test_suite_finish(const boost::unit_test::test_suite &inTestSuite)
Exits a test suite and prunes it if no test cases remain in it.
Convenience test fixture struct to request desired logging level from Boost.Test. ...
std::string string
Imported type.
virtual ~RegressionFilter(void)
Removes all test suites marked for pruning.
virtual string getFullyQualifiedName(const boost::unit_test::test_case &inTestCase)
Returns a fully qualified name for the given test case.
Encapsulation of filesystem paths that are used by the library.
virtual void visit(const boost::unit_test::test_case &inTestCase)
std::vector< const test_suite * > mTestSuiteVector
Vector of test suite pointers.
virtual void useTest(const boost::unit_test::test_case &inTestCase)
Flags the given test case and its parents as being used.
std::vector< boost::unit_test::test_unit_id > mTestSuitePruningIDs
Vector of test suites to remove.
std::vector< bool > mTestSuiteUsed
Vector of test suite usage flags.