diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 76da41008c..0c6baef92d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -55,12 +55,10 @@ get_property(COMPLEX_PLUGIN_COUNT GLOBAL PROPERTY COMPLEX_PLUGIN_COUNT) # Create dependencies with complex_test on each of the test plugins #------------------------------------------------------------------------------ if(COMPLEX_PLUGIN_ENABLE_TestOne) - MATH(EXPR COMPLEX_PLUGIN_COUNT "${COMPLEX_PLUGIN_COUNT}+1") add_dependencies(complex_test TestOne) endif() if(COMPLEX_PLUGIN_ENABLE_TestTwo) - MATH(EXPR COMPLEX_PLUGIN_COUNT "${COMPLEX_PLUGIN_COUNT}+1") add_dependencies(complex_test TestTwo) endif() diff --git a/test/PluginTest.cpp b/test/PluginTest.cpp index 10aed296ed..8106f64e85 100644 --- a/test/PluginTest.cpp +++ b/test/PluginTest.cpp @@ -31,6 +31,15 @@ TEST_CASE("Test Loading Plugins") const auto& filterHandles = filterList->getFilterHandles(); auto plugins = filterList->getLoadedPlugins(); + if(plugins.size() != COMPLEX_PLUGIN_COUNT) + { + std::cout << "Incorrect number of plugins were loaded.\n" << "Expected: " << COMPLEX_PLUGIN_COUNT << "\nLoaded: " << plugins.size() << "\nLoaded Plugins are:\n"; + for(auto const& plugin : plugins) + { + std::cout << plugin->getName() << std::endl; + } + } + REQUIRE(plugins.size() == COMPLEX_PLUGIN_COUNT); REQUIRE(filterHandles.size() >= 2); @@ -62,6 +71,14 @@ TEST_CASE("Test Singleton") auto plugins = filterList->getLoadedPlugins(); // Check plugins were loaded + if(plugins.size() != COMPLEX_PLUGIN_COUNT) + { + std::cout << "Incorrect number of plugins were loaded.\n" << "Expected: " << COMPLEX_PLUGIN_COUNT << "\nLoaded: " << plugins.size() << "\nLoaded Plugins are:\n"; + for(auto const& plugin : plugins) + { + std::cout << plugin->getName() << std::endl; + } + } REQUIRE(plugins.size() == COMPLEX_PLUGIN_COUNT); // Check filters loaded