diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-03-27 16:56:47 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-03-27 16:56:47 +0000 |
| commit | 41e210a888ae68e1d908e60d903a65672f068b14 (patch) | |
| tree | 993f2fccd68aec0993c89e7fa610047b4abd8953 /src/cppunit/TestRegistry.cpp | |
| parent | fba5df08cb90d511e536f53d0aea57b547e2b6ef (diff) | |
| download | cppunit-41e210a888ae68e1d908e60d903a65672f068b14.tar.gz | |
Makefile.
makefile.am: added src/CppUnitLibraries.dsw, new contribution, and
src/qttestrunner.
* TODO: updated (doc).
* contrib/msvc/AddingUnitTestMethod.dsm: added, submitted by
bloodchen@hotmail.com.
* constrib/msvc/readme.txt: updated.
* include/cppunit/TestAsserter.h:
* include/cppunit/SourceLine.h: updated doc.
* include/cppunit/TestCaller.h: reindented. updated doc.
* include/cppunit/extensions/HelperMacros.h: relaxed constraint on fixture.
Fixture base class may be TestFixture instead of TestCase.
* include/cppunit/TestCase.h:
* src/cppunit/TestCase.h: TestCase inherits TestFixture for setUp() and
tearDown() definition. Moved documentation to TestFixture.
* include/cppunit/TestFixture.h: updated documentation.
* include/cppunit/TestRegistry.h:
* src/cppunit/TestRegistry.cpp: Removed. Replaced by TestFactoryRegistry.
* include/cppunit/TextTestRunner.h:
* src/cppunit/TextTestRunner.cpp: made printing progress using a
TextTestProgressListener optional.
* examples\cppunittest\ExceptionTest.h:
* examples\cppunittest\HelperMacrosTest.h:
* examples\cppunittest\HelperMacrosTest.cpp:
* examples\cppunittest\NotEqualException.h:
* examples\cppunittest\OrthodoxTest.h:
* examples\cppunittest\RepeatedTest.h:
* examples\cppunittest\TestAssertTest.h:
* examples\cppunittest\TestCallerTest.h:
* examples\cppunittest\TestDecoratorTest.h:
* examples\cppunittest\TestFailureTest.h:
* examples\cppunittest\TestResultCollectorTest.h:
* examples\cppunittest\TestResultTest.h:
* examples\cppunittest\TestSetUpTest.h:
* examples\cppunittest\TestSuiteTest.h:
* examples\cppunittest\XmlOutputterTest.h:
* examples\cppunittest\XmlOutputterTest.cpp:
* examples\cppunittest\XmlUniformizerTest.h:
* examples\cppunittest\XmlUniformizerTest.cpp: changed base class for fixture
from TestCase to TestFixture.
* examples\hierarchy\BoardGameTest.h:
* examples\hierarchy\ChessTest.h:
* examples\hierarchy\main.cpp: updated to use HelperMacros for correct
fixture instantiation (the ChessBoard::testReset test case was using
BoardGame fixture instance instead of ChessBoard).
Diffstat (limited to 'src/cppunit/TestRegistry.cpp')
| -rw-r--r-- | src/cppunit/TestRegistry.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/cppunit/TestRegistry.cpp b/src/cppunit/TestRegistry.cpp deleted file mode 100644 index 6f9b713..0000000 --- a/src/cppunit/TestRegistry.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include <cppunit/Portability.h> -#include "cppunit/TestRegistry.h" -#include "cppunit/Test.h" - -namespace CppUnit { - -TestRegistry& -TestRegistry::getRegistry () -{ - static TestRegistry registry; // instantiated on first call of getRegistry(). - return registry; -} - -void -TestRegistry::addTest(std::string name, Test *test) -{ - getRegistry().m_registry_names.push_back (name); - getRegistry().m_registry_tests.push_back (test); -} - -const std::vector<std::string>& -TestRegistry::getAllTestNames () const -{ - return getRegistry().m_registry_names; -} - -const std::vector<Test*>& -TestRegistry::getAllTests() const -{ - return getRegistry().m_registry_tests; -} - -std::vector<Test*> -TestRegistry::getTest (const std::string& testCase) const -{ - std::vector<Test*> res; - std::vector<Test*>::iterator test_it; - std::vector<std::string>::iterator name_it; - for (test_it = getRegistry().m_registry_tests.begin (), - name_it = getRegistry().m_registry_names.begin (); - test_it != getRegistry().m_registry_tests.end (); - ++test_it, ++name_it) { - if ((*name_it) == testCase) { - res.push_back((*test_it)); - break; - } - } - return(res); -} - -TestRegistry::~TestRegistry () -{ - for (std::vector<Test*>::iterator it = m_registry_tests.begin (); - it != m_registry_tests.end (); - ++it) { - delete *it; - } -} - -TestRegistry::TestRegistry () -{ -} - -} // namespace CppUnit - |
