Uninit var: Added TODO test case
This commit is contained in:
parent
fbb5ebe3c6
commit
548a43fc49
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue