00001 #ifndef CPPUNIT_TESTREGISTRY_H
00002 #define CPPUNIT_TESTREGISTRY_H
00003
00004 #include <vector>
00005 #include <string>
00006
00007 namespace CppUnit {
00008
00009 class Test;
00010
00019 class TestRegistry {
00020 public:
00021 static TestRegistry& getRegistry();
00022
00023 ~TestRegistry();
00024
00025 const std::vector<std::string>& getAllTestNames() const;
00026 const std::vector<Test*>& getAllTests() const;
00027 std::vector<Test*> getTest(const std::string& name) const;
00028 void addTest(std::string name, Test* test);
00029
00030 private:
00031 TestRegistry();
00032 std::vector<std::string> m_registry_names;
00033 std::vector<Test*> m_registry_tests;
00034
00035 };
00036
00037 }
00038
00039 #endif // CPPUNIT_TESTREGISTRY_H
00040