]> git.mxchange.org Git - simgear.git/blobdiff - simgear/props/propertyObject_test.cxx
hla: Use raw pointers for HLAFederate::_insert methods.
[simgear.git] / simgear / props / propertyObject_test.cxx
index 61a050c07467f0b7fa66befa9ed4b62c5296e5a4..7021395a64839a0b0f3daa558b20425c87361476 100644 (file)
@@ -2,15 +2,19 @@
 #  include <simgear_config.h>
 #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 <simgear/compiler.h>
 
 #include <iostream>
 #include <cassert>
+#include <cstdlib>
 #include <cstring>
 
-// working around MSVC weirdness with props.hxx and SGMathFwd
-#include <simgear/math/SGMath.hxx>
-
 #include "propertyObject.hxx"
 
 #include <simgear/structure/exception.hxx>
@@ -143,8 +147,9 @@ void testReadMissing()
   PropertyObject<bool> 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
   }