memory leaks: refactoring unit tests

This commit is contained in:
Daniel Marjamäki 2009-10-01 22:25:59 +02:00
parent e894e37131
commit 57067f6627
1 changed files with 1 additions and 6 deletions

View File

@ -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; }"));
}