Refactoring: simplified test case
This commit is contained in:
parent
d7db82293e
commit
15da4fe689
|
@ -398,11 +398,10 @@ private:
|
||||||
"\n"
|
"\n"
|
||||||
"static void f()\n"
|
"static void f()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int datasize = 10;\n"
|
" struct ABC* x = (struct ABC *)malloc(sizeof(struct ABC) + 10);\n"
|
||||||
" struct ABC* x = (struct ABC *)malloc(sizeof(struct ABC) + datasize - 1);\n"
|
|
||||||
" x->str[1] = 0;"
|
" x->str[1] = 0;"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("[test.cpp:10]: (possible error) Array 'str[1]' index 1 out of bounds\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:9]: (possible error) Array 'str[1]' index 1 out of bounds\n", errout.str());
|
||||||
TODO_ASSERT_EQUALS("", errout.str());
|
TODO_ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue