summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-12-16 10:10:22 +0100
committerDavid Tardon <dtardon@redhat.com>2016-12-16 10:10:33 +0100
commit3bf22cb6d0645bf329fec9c850477b2fc9976f6c (patch)
tree6dbfcbf8232501c4671c5a58dd7f3fb5a8464db6 /include
parentff6ce1d7c00be2279f905b2f08cbbd67fa239ae7 (diff)
tdf#104498 CPPUNIT_USE_TYPEINFO_NAME is a flag
... so check just for existence.
Diffstat (limited to 'include')
-rw-r--r--include/cppunit/TestAssert.h2
-rw-r--r--include/cppunit/TestCaller.h4
-rw-r--r--include/cppunit/extensions/ExceptionTestCaseDecorator.h2
3 files changed, 4 insertions, 4 deletions
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 <cppunit/TestCase.h>
-#if CPPUNIT_USE_TYPEINFO_NAME
+#if defined(CPPUNIT_USE_TYPEINFO_NAME)
# include <cppunit/extensions/TypeInfoHelper.h>
#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: " +