diff options
-rw-r--r-- | test/common/ptr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/common/ptr.h b/test/common/ptr.h index 0c871a761d..790d541b13 100644 --- a/test/common/ptr.h +++ b/test/common/ptr.h @@ -127,14 +127,14 @@ class PtrTestSuite : public CxxTest::TestSuite { void test_deleter() { Deleter<int> myDeleter; - myDeleter.test = new bool(false); + bool test = false; + myDeleter.test = &test; { Common::SharedPtr<int> p(new int(1), myDeleter); } - TS_ASSERT_EQUALS(*myDeleter.test, true); - delete myDeleter.test; + TS_ASSERT_EQUALS(test, true); } void test_compare() { |