Uninit var: Added TODO test case

This commit is contained in:
Daniel Marjamäki 2012-02-06 07:17:39 +01:00
parent fbb5ebe3c6
commit 548a43fc49
1 changed files with 7 additions and 0 deletions

View File

@ -1760,6 +1760,13 @@ private:
"}"); "}");
ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: abc\n", errout.str()); 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" checkUninitVar2("int f() {\n"
" static int x;\n" " static int x;\n"
" return ++x;\n" " return ++x;\n"