From 3bf22cb6d0645bf329fec9c850477b2fc9976f6c Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 16 Dec 2016 10:10:22 +0100 Subject: tdf#104498 CPPUNIT_USE_TYPEINFO_NAME is a flag ... so check just for existence. --- include/cppunit/TestAssert.h | 2 +- include/cppunit/TestCaller.h | 4 ++-- include/cppunit/extensions/ExceptionTestCaseDecorator.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include/cppunit') diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h index d9f7299..69c105e 100644 --- a/include/cppunit/TestAssert.h +++ b/include/cppunit/TestAssert.h @@ -502,7 +502,7 @@ void assertGreaterEqual( const T& expected, // implementation detail -#if CPPUNIT_USE_TYPEINFO_NAME +#if defined(CPPUNIT_USE_TYPEINFO_NAME) #define CPPUNIT_EXTRACT_EXCEPTION_TYPE_( exception, no_rtti_message ) \ CPPUNIT_NS::TypeInfoHelper::getClassName( typeid(exception) ) #else diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h index aba2c27..bbb9002 100644 --- a/include/cppunit/TestCaller.h +++ b/include/cppunit/TestCaller.h @@ -5,7 +5,7 @@ #include -#if CPPUNIT_USE_TYPEINFO_NAME +#if defined(CPPUNIT_USE_TYPEINFO_NAME) # include #endif @@ -33,7 +33,7 @@ struct ExpectedExceptionTraits { static void expectedException() { -#if CPPUNIT_USE_TYPEINFO_NAME +#if defined(CPPUNIT_USE_TYPEINFO_NAME) throw Exception( Message( "expected exception not thrown", "Expected exception type: " + diff --git a/include/cppunit/extensions/ExceptionTestCaseDecorator.h b/include/cppunit/extensions/ExceptionTestCaseDecorator.h index 2929a00..a3f2b3e 100644 --- a/include/cppunit/extensions/ExceptionTestCaseDecorator.h +++ b/include/cppunit/extensions/ExceptionTestCaseDecorator.h @@ -76,7 +76,7 @@ public: // Moved outside the try{} statement to handle the case where the // expected exception type is Exception (expecting assertion failure). -#if CPPUNIT_USE_TYPEINFO_NAME +#if defined(CPPUNIT_USE_TYPEINFO_NAME) throw Exception( Message( "expected exception not thrown", "Expected exception type: " + -- cgit v1.2.1