From 333c6d9e0ae50485e61ab8bcfffa7c2e41e545c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 4 Sep 2009 19:11:19 +0200 Subject: [PATCH] memory leaks: Added a todo test case for the getcode function --- test/testmemleak.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 352300c9c..0125e2f10 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -339,6 +339,9 @@ private: ASSERT_EQUALS(";;if{}", getcode("char *s; if (a && s) { }", "s")); ASSERT_EQUALS(";;if(!var){}", getcode("char *s; if (a && !s) { }", "s")); + // There are missing semicolons in the extracted code + TODO_ASSERT_EQUALS(";;;if{dealloc;}if{dealloc;return;}assign;returnuse;", getcode("char *buf, *tmp; tmp = realloc(buf, 40); if (!(tmp)) { free(buf); return; } buf = tmp; return buf;", "buf")); + // switch.. ASSERT_EQUALS(";;switch{case;break;};", getcode("char *s; switch(a){case 1: break;};", "s"));