Fixed some small formatting issues in test suite
This commit is contained in:
parent
0f03995995
commit
657e5d7ea2
|
@ -4505,9 +4505,9 @@ private:
|
||||||
ASSERT_EQUALS("[test.cpp:2]: (style) Clarify calculation precedence for '*' and '?'.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:2]: (style) Clarify calculation precedence for '*' and '?'.\n", errout.str());
|
||||||
|
|
||||||
// Ticket #2585 - segmentation fault for invalid code
|
// Ticket #2585 - segmentation fault for invalid code
|
||||||
check("abcdef?" "?<"
|
check("abcdef??<"
|
||||||
"123456?" "?>"
|
"123456??>"
|
||||||
"+?" "?=");
|
"+??=");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
check("void f(char c) {\n"
|
check("void f(char c) {\n"
|
||||||
|
@ -7145,7 +7145,7 @@ private:
|
||||||
void checkCastIntToCharAndBack() { // #160
|
void checkCastIntToCharAndBack() { // #160
|
||||||
|
|
||||||
// check getchar
|
// check getchar
|
||||||
check("void f(){ \n"
|
check("void f() {\n"
|
||||||
"unsigned char c;\n"
|
"unsigned char c;\n"
|
||||||
" while( (c = getchar()) != EOF)\n"
|
" while( (c = getchar()) != EOF)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
|
@ -7154,7 +7154,7 @@ private:
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
||||||
|
|
||||||
check("void f(){ \n"
|
check("void f() {\n"
|
||||||
"unsigned char c = getchar();\n"
|
"unsigned char c = getchar();\n"
|
||||||
" while( EOF != c)\n"
|
" while( EOF != c)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
|
@ -7163,7 +7163,7 @@ private:
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
||||||
|
|
||||||
check("void f(){ \n"
|
check("void f() {\n"
|
||||||
"unsigned char c;\n"
|
"unsigned char c;\n"
|
||||||
" while( EOF != (c = getchar()) )\n"
|
" while( EOF != (c = getchar()) )\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
|
@ -7172,7 +7172,7 @@ private:
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:3]: (warning) Storing getchar() return value in char variable and then comparing with EOF.\n", errout.str());
|
||||||
|
|
||||||
check("void f(){ \n"
|
check("void f() {\n"
|
||||||
"int i;\n"
|
"int i;\n"
|
||||||
" while( (i = getchar()) != EOF)\n"
|
" while( (i = getchar()) != EOF)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
|
@ -7181,7 +7181,7 @@ private:
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
check("void f(){ \n"
|
check("void f() {\n"
|
||||||
"int i;\n"
|
"int i;\n"
|
||||||
" while( EOF != (i = getchar()) )\n"
|
" while( EOF != (i = getchar()) )\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
|
|
|
@ -1752,7 +1752,7 @@ private:
|
||||||
"extern void SomeTestFunc(float);\n"
|
"extern void SomeTestFunc(float);\n"
|
||||||
"void MyFuncNoError2()\n"
|
"void MyFuncNoError2()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" const float floatC = 2.2f; \n"
|
" const float floatC = 2.2f;\n"
|
||||||
" float floatTot = g_float * floatC;\n"
|
" float floatTot = g_float * floatC;\n"
|
||||||
" SomeTestFunc(floatTot);\n"
|
" SomeTestFunc(floatTot);\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
|
|
Loading…
Reference in New Issue