diff options
author | Vincent Richard <[email protected]> | 2005-09-06 20:08:39 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-09-06 20:08:39 +0000 |
commit | 3b1fcbe825c90dcb5e358ad7632b45d4cd512f54 (patch) | |
tree | 183d183a49b40058a300a7832cfe02c91ec5cab8 /tests/testRunner.cpp | |
parent | Added progression notifications. (diff) | |
download | vmime-3b1fcbe825c90dcb5e358ad7632b45d4cd512f54.tar.gz vmime-3b1fcbe825c90dcb5e358ad7632b45d4cd512f54.zip |
New namespace for message digest algorithms.
Diffstat (limited to 'tests/testRunner.cpp')
-rw-r--r-- | tests/testRunner.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
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 <time.h> #include <iostream> +#include <vector> +#include <algorithm> #include <cppunit/XmlOutputter.h> #include <cppunit/extensions/TestFactoryRegistry.h> @@ -165,6 +167,26 @@ private: }; + +// see testUtils.hpp + +std::vector <std::string>& getTestModules() +{ + static std::vector <std::string> allModules; + return allModules; +} + + +void registerTestModule(const char* name_) +{ + std::vector <std::string>& 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 <XmlTestListener> xmlListener(new XmlTestListener); |