From 3b1fcbe825c90dcb5e358ad7632b45d4cd512f54 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 6 Sep 2005 20:08:39 +0000 Subject: New namespace for message digest algorithms. --- tests/testRunner.cpp | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'tests/testRunner.cpp') diff --git a/tests/testRunner.cpp b/tests/testRunner.cpp index 883869a0..2f4e41ec 100644 --- a/tests/testRunner.cpp +++ b/tests/testRunner.cpp @@ -21,6 +21,8 @@ #include #include +#include +#include #include #include @@ -165,6 +167,26 @@ private: }; + +// see testUtils.hpp + +std::vector & getTestModules() +{ + static std::vector allModules; + return allModules; +} + + +void registerTestModule(const char* name_) +{ + std::vector & testModules = getTestModules(); + std::string name(name_); + + if (std::find(testModules.begin(), testModules.end(), name) == testModules.end()) + testModules.push_back(name); +} + + int main(int argc, char* argv[]) { // VMime initialization @@ -186,9 +208,12 @@ int main(int argc, char* argv[]) { // Get the test suites from the registry and add them to the list of test to run CppUnit::TestRunner runner; - runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("Parser").makeTest()); - runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("Utility").makeTest()); - runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("Misc").makeTest()); + + for (unsigned int i = 0 ; i < getTestModules().size() ; ++i) + { + runner.addTest(CppUnit::TestFactoryRegistry:: + getRegistry(getTestModules()[i]).makeTest()); + } std::auto_ptr xmlListener(new XmlTestListener); -- cgit v1.2.3