From: ThorstenB Date: Mon, 2 Jan 2012 22:04:40 +0000 (+0100) Subject: Fix compiler warning / test issue. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=68625e48b90e47f13766e2af893b840932ace0f6;p=simgear.git Fix compiler warning / test issue. --- diff --git a/simgear/props/propertyObject_test.cxx b/simgear/props/propertyObject_test.cxx index 61a050c0..b366d27a 100644 --- a/simgear/props/propertyObject_test.cxx +++ b/simgear/props/propertyObject_test.cxx @@ -2,6 +2,12 @@ # include #endif +#ifdef NDEBUG +// Always enable DEBUG mode in test application, otherwise "assert" test +// statements have no effect and don't actually test anything (catch 17 ;-) ). +#undef NDEBUG +#endif + #include #include @@ -143,8 +149,9 @@ void testReadMissing() PropertyObject b("not/found/honest"); try { - bool v = b; + bool v = b; assert(false && "read of missing property didn't throw"); + (void) v; // don't warn about unused variable } catch (sg_exception& e) { // expected }