21 #ifndef mia_internal_autotest_hh 22 #define mia_internal_autotest_hh 30 #ifndef BOOST_TEST_DYN_LINK 31 #define BOOST_TEST_DYN_LINK 34 #define BOOST_TEST_MAIN 35 #define BOOST_TEST_NO_MAIN 36 #include <boost/test/unit_test.hpp> 37 #include <boost/test/floating_point_comparison.hpp> 39 #include <miaconfig.h> 52 void test_pluginsets(
const std::set< std::string >& plugins,
const std::set<std::string>& test_data)
54 BOOST_CHECK_EQUAL(plugins.size(), test_data.size());
55 for (
auto p = plugins.begin(); p != plugins.end(); ++p) {
56 BOOST_CHECK_MESSAGE(test_data.find(*p) != test_data.end(),
"unexpected plugin '" << *p <<
"' found");
59 for (
auto p = test_data.begin(); p != test_data.end(); ++p)
60 BOOST_CHECK_MESSAGE(plugins.find(*p) != plugins.end(),
"expected plugin '" << *p <<
"' not found");
64 int BOOST_TEST_CALL_DECL
67 mia::PrepareTestPluginPath prepare_plugin_path;
69 _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
70 _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );
72 if (mia::CCmdOptionList(
description).parse(argc, argv,
"boost-test-option") != mia::CCmdOptionList::hr_no)
75 return ::boost::unit_test::unit_test_main( &init_unit_test, argc, argv );
void test_pluginsets(const std::set< std::string > &plugins, const std::set< std::string > &test_data)
std::map< EProgramDescriptionEntry, const char * > SProgramDescription
the map that holds a basic program description
const mia::SProgramDescription description
int BOOST_TEST_CALL_DECL do_main(int argc, char *argv[])