diff options
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/testcommon.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp index bd75ac37..3de7da1d 100644 --- a/test/common/testcommon.cpp +++ b/test/common/testcommon.cpp @@ -312,10 +312,11 @@ int test(int argc, const char *argv[]) // Check that using timer methods without initialisation // throws an assertion failure. Can only do this in debug mode #ifndef BOX_RELEASE_BUILD - TEST_CHECK_THROWS(Timers::Add(*(Timer*)NULL), - CommonException, AssertFailed); - TEST_CHECK_THROWS(Timers::Remove(*(Timer*)NULL), - CommonException, AssertFailed); + { + Timer tim(0, "tim"); + TEST_CHECK_THROWS(Timers::Add(tim), CommonException, AssertFailed); + Timers::Remove(tim); + } #endif // TEST_CHECK_THROWS(Timers::Signal(), CommonException, AssertFailed); |