unit testing: minor syntax updates
This commit is contained in:
parent
45c3ba3c28
commit
d85fb9dd3d
|
@ -702,7 +702,7 @@ private:
|
||||||
// errors..
|
// errors..
|
||||||
checkNullPointer("void foo(struct ABC *abc)\n"
|
checkNullPointer("void foo(struct ABC *abc)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int *a = abc->a;\n"
|
" int a = abc->a;\n"
|
||||||
" if (!abc)\n"
|
" if (!abc)\n"
|
||||||
" ;\n"
|
" ;\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
|
@ -737,7 +737,7 @@ private:
|
||||||
// reassign struct..
|
// reassign struct..
|
||||||
checkNullPointer("void foo(struct ABC *abc)\n"
|
checkNullPointer("void foo(struct ABC *abc)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" a = abc->a;\n"
|
" int a = abc->a;\n"
|
||||||
" abc = abc->next;\n"
|
" abc = abc->next;\n"
|
||||||
" if (!abc)\n"
|
" if (!abc)\n"
|
||||||
" ;\n"
|
" ;\n"
|
||||||
|
@ -746,7 +746,7 @@ private:
|
||||||
|
|
||||||
checkNullPointer("void foo(struct ABC *abc)\n"
|
checkNullPointer("void foo(struct ABC *abc)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" a = abc->a;\n"
|
" int a = abc->a;\n"
|
||||||
" f(&abc);\n"
|
" f(&abc);\n"
|
||||||
" if (!abc)\n"
|
" if (!abc)\n"
|
||||||
" ;\n"
|
" ;\n"
|
||||||
|
@ -756,6 +756,7 @@ private:
|
||||||
// goto..
|
// goto..
|
||||||
checkNullPointer("void foo(struct ABC *abc)\n"
|
checkNullPointer("void foo(struct ABC *abc)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
" int a;\n"
|
||||||
" if (!abc)\n"
|
" if (!abc)\n"
|
||||||
" goto out;"
|
" goto out;"
|
||||||
" a = abc->a;\n"
|
" a = abc->a;\n"
|
||||||
|
|
Loading…
Reference in New Issue