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 /src/cppunit/Protector.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 'src/cppunit/Protector.cpp')
| -rw-r--r-- | src/cppunit/Protector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cppunit/Protector.cpp b/src/cppunit/Protector.cpp index 5c171ec..492bec1 100644 --- a/src/cppunit/Protector.cpp +++ b/src/cppunit/Protector.cpp @@ -2,6 +2,7 @@ #include <cppunit/Message.h> #include <cppunit/Protector.h> #include <cppunit/TestResult.h> +#include <cppunit/portability/SmartPtr.h> #include "ProtectorContext.h" #include <memory> @@ -21,7 +22,7 @@ void Protector::reportError( const ProtectorContext &context, const Exception &error ) const { - std::auto_ptr<Exception> actualError( error.clone() ); + CppUnitSmartPtr<Exception> actualError( error.clone() ); actualError->setMessage( actualMessage( actualError->message(), context ) ); context.m_result->addError( context.m_test, actualError.release() ); @@ -42,7 +43,7 @@ void Protector::reportFailure( const ProtectorContext &context, const Exception &failure ) const { - std::auto_ptr<Exception> actualFailure( failure.clone() ); + CppUnitSmartPtr<Exception> actualFailure( failure.clone() ); actualFailure->setMessage( actualMessage( actualFailure->message(), context ) ); context.m_result->addFailure( context.m_test, actualFailure.release() ); |
