diff options
| author | Bastiaan Bakker <bastiaan.bakker@lifeline.nl> | 2001-04-29 13:09:16 +0000 |
|---|---|---|
| committer | Bastiaan Bakker <bastiaan.bakker@lifeline.nl> | 2001-04-29 13:09:16 +0000 |
| commit | b08ecaecc1e39b7b01e02b7b73559d8b34ff46a5 (patch) | |
| tree | bf1ed1e3680cb0256e73336e22fb70c692524fcb /src/cppunit/TestRegistry.cpp | |
| parent | 5ce1a68589aa3ea4f9ee255cfecc94cc1730c6fa (diff) | |
| download | cppunit-b08ecaecc1e39b7b01e02b7b73559d8b34ff46a5.tar.gz | |
Merged Baptiste Lepilleurs CppUnitW 1.2.
Some differences:
TypeInfo stuff (in TestSuite) compiled in only if USE_TYPEINFO is set.
TestSuite.getTests now returns a const ref instead of taking a ref as param.
Removed auto_ptr stuff from TestFactoryRegistry: auto_ptr cannot be used in
containers.
Diffstat (limited to 'src/cppunit/TestRegistry.cpp')
| -rw-r--r-- | src/cppunit/TestRegistry.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cppunit/TestRegistry.cpp b/src/cppunit/TestRegistry.cpp index f4eaf74..cb96eb0 100644 --- a/src/cppunit/TestRegistry.cpp +++ b/src/cppunit/TestRegistry.cpp @@ -1,18 +1,18 @@ +#if _MSC_VER > 1000 // VC++ +#pragma once +#pragma warning( disable : 4786 ) // disable warning debug symbol > 255... +#endif // _MSC_VER > 1000 + #include "cppunit/TestRegistry.h" #include "cppunit/Test.h" namespace CppUnit { -TestRegistry* -TestRegistry::s_registry = NULL; - TestRegistry& TestRegistry::getRegistry () { - if (NULL == s_registry) { - s_registry = new TestRegistry(); - } - return *s_registry; + static TestRegistry registry; // instantiated on first call of getRegistry(). + return registry; } void |
