From 548a43fc49496af9a07a0053a8117c472c641b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 6 Feb 2012 07:17:39 +0100 Subject: [PATCH] Uninit var: Added TODO test case --- test/testuninitvar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testuninitvar.cpp b/test/testuninitvar.cpp index 9a2c4e911..5549a1846 100644 --- a/test/testuninitvar.cpp +++ b/test/testuninitvar.cpp @@ -1760,6 +1760,13 @@ private: "}"); ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: abc\n", errout.str()); + checkUninitVar2("void f() {\n" + " int x;\n" + " int y = x;\n" + "}\n"); + TODO_ASSERT_EQUALS("error", "", errout.str()); + + checkUninitVar2("int f() {\n" " static int x;\n" " return ++x;\n"