From 57067f6627528acea9c1e1aeb6659b9acca5f522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 1 Oct 2009 22:25:59 +0200 Subject: [PATCH] memory leaks: refactoring unit tests --- test/testmemleak.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 540f4fb75..4ad5756c3 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -474,9 +474,9 @@ private: ASSERT_EQUALS("; if(!var) xxx ;", simplifycode("; if(var) ; else xxx ;")); ASSERT_EQUALS("; ifv xxx ;", simplifycode("; ifv ; else xxx ;")); ASSERT_EQUALS("; alloc ;", simplifycode("; alloc; if { dealloc; return; }")); + ASSERT_EQUALS("; alloc ;", simplifycode("; alloc; if { return use; }")); ASSERT_EQUALS("; alloc ; return ;", simplifycode(";alloc;if{return;}return;")); - // switch.. ASSERT_EQUALS("; alloc ; dealloc ;", simplifycode(";alloc;switch{case;break;};dealloc;")); @@ -576,11 +576,6 @@ private: // Todo.. ASSERT_EQUALS(-1, dofindleak("; alloc;\n if { dealloc; }\n ;")); TODO_ASSERT_EQUALS(3, dofindleak("; alloc;\n if { dealloc; }\n ;")); - - ASSERT_EQUALS(-1, dofindleak("alloc; if { return use; }")); - TODO_ASSERT_EQUALS(1, dofindleak("alloc; if { return use; }")); - ASSERT_EQUALS(-1, dofindleak("alloc; if { dealloc; return; }")); - TODO_ASSERT_EQUALS(1, dofindleak("alloc; if { dealloc; return; }")); }