TESTS: Remove unnecessary heap allocation

This commit is contained in:
Colin Snover 2017-11-12 17:00:35 -06:00
parent 62825c5cf8
commit 9f465b4062

View File

@ -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() {