summaryrefslogtreecommitdiff
path: root/examples/msvc6/HostApp/ExampleTestCase.cpp
diff options
context:
space:
mode:
authorBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-04-29 13:09:16 +0000
committerBastiaan Bakker <bastiaan.bakker@lifeline.nl>2001-04-29 13:09:16 +0000
commitb08ecaecc1e39b7b01e02b7b73559d8b34ff46a5 (patch)
treebf1ed1e3680cb0256e73336e22fb70c692524fcb /examples/msvc6/HostApp/ExampleTestCase.cpp
parent5ce1a68589aa3ea4f9ee255cfecc94cc1730c6fa (diff)
downloadcppunit-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 'examples/msvc6/HostApp/ExampleTestCase.cpp')
-rw-r--r--examples/msvc6/HostApp/ExampleTestCase.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/examples/msvc6/HostApp/ExampleTestCase.cpp b/examples/msvc6/HostApp/ExampleTestCase.cpp
index e6e57a4..6cfd562 100644
--- a/examples/msvc6/HostApp/ExampleTestCase.cpp
+++ b/examples/msvc6/HostApp/ExampleTestCase.cpp
@@ -1,8 +1,11 @@
-
+#include <cppunit/extensions/TestSuiteBuilder.h>
#include "ExampleTestCase.h"
+CU_TEST_SUITE_REGISTRATION( ExampleTestCase );
+
+
void ExampleTestCase::example ()
{
@@ -53,17 +56,3 @@ void ExampleTestCase::testEquals ()
}
-
-
-
-CppUnit::Test *ExampleTestCase::suite ()
-{
- CppUnit::TestSuite *testSuite = new CppUnit::TestSuite ("ExampleTestCase");
-
- testSuite->addTest (new CppUnit::TestCaller <ExampleTestCase> ("anotherExample", anotherExample));
- testSuite->addTest (new CppUnit::TestCaller <ExampleTestCase> ("testAdd", testAdd));
- testSuite->addTest (new CppUnit::TestCaller <ExampleTestCase> ("testDivideByZero", testDivideByZero));
- testSuite->addTest (new CppUnit::TestCaller <ExampleTestCase> ("testEquals", testEquals));
-
- return testSuite;
-}