diff options
| author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-11-07 05:41:20 -0800 |
|---|---|---|
| committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-11-07 06:06:09 -0800 |
| commit | 5cb290d77a3539a492eac43202f27ecd150c99a0 (patch) | |
| tree | 794065d4987c1b226209dd30b24830b80a47e6b2 /examples/msvc6/HostApp/ExampleTestCase.cpp | |
| parent | c5813be8793da22ec25e4dfdf9d6dec43695cbeb (diff) | |
| download | cppunit-5cb290d77a3539a492eac43202f27ecd150c99a0.tar.gz | |
add a flag for adding optional features
These features will switch the used C++ version from C++03 to C++11. We
are also going to use std::unique_ptr instead of std::auto_ptr for the
c++11 mode.
Diffstat (limited to 'examples/msvc6/HostApp/ExampleTestCase.cpp')
| -rw-r--r-- | examples/msvc6/HostApp/ExampleTestCase.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/msvc6/HostApp/ExampleTestCase.cpp b/examples/msvc6/HostApp/ExampleTestCase.cpp index ec13319..727fd30 100644 --- a/examples/msvc6/HostApp/ExampleTestCase.cpp +++ b/examples/msvc6/HostApp/ExampleTestCase.cpp @@ -1,4 +1,5 @@ #include "ExampleTestCase.h" +#include <cppunit/portability/SmartPtr.h> CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTestCase ); @@ -31,14 +32,14 @@ void ExampleTestCase::testAdd () void ExampleTestCase::testEquals () { - std::auto_ptr<long> l1 (new long (12)); - std::auto_ptr<long> l2 (new long (12)); + CppUnitSmartPtr<long> l1 (new long (12)); + CppUnitSmartPtr<long> l2 (new long (12)); CPPUNIT_ASSERT_EQUAL (12, 12); CPPUNIT_ASSERT_EQUAL (12L, 12L); CPPUNIT_ASSERT_EQUAL (*l1, *l2); - CPPUNIT_ASSERT (12L == 12L); - CPPUNIT_ASSERT_EQUAL (12, 13); - CPPUNIT_ASSERT_DOUBLES_EQUAL (12.0, 11.99, 0.5); + CPPUNIT_ASSERT (12L == 12L); + CPPUNIT_ASSERT_EQUAL (12, 13); + CPPUNIT_ASSERT_DOUBLES_EQUAL (12.0, 11.99, 0.5); } |
