Skip to content

Commit ebe2dfb

Browse files
Update testother.cpp
1 parent 0daa504 commit ebe2dfb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/testother.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -10842,31 +10842,31 @@ class TestOther : public TestFixture {
1084210842
"unsigned char c;\n"
1084310843
"do {\n"
1084410844
" c = getc (pFile);\n"
10845-
"} while (c != EOF)"
10845+
"} while (c != EOF);"
1084610846
"}");
1084710847
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing getc() return value in char variable and then comparing with EOF.\n", errout_str());
1084810848

1084910849
check("void f (FILE * pFile){\n"
1085010850
"unsigned char c;\n"
1085110851
"do {\n"
1085210852
" c = getc (pFile);\n"
10853-
"} while (EOF != c)"
10853+
"} while (EOF != c);"
1085410854
"}");
1085510855
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing getc() return value in char variable and then comparing with EOF.\n", errout_str());
1085610856

1085710857
check("void f (FILE * pFile){\n"
1085810858
"int i;\n"
1085910859
"do {\n"
1086010860
" i = getc (pFile);\n"
10861-
"} while (i != EOF)"
10861+
"} while (i != EOF);"
1086210862
"}");
1086310863
ASSERT_EQUALS("", errout_str());
1086410864

1086510865
check("void f (FILE * pFile){\n"
1086610866
"int i;\n"
1086710867
"do {\n"
1086810868
" i = getc (pFile);\n"
10869-
"} while (EOF != i)"
10869+
"} while (EOF != i);"
1087010870
"}");
1087110871
ASSERT_EQUALS("", errout_str());
1087210872

@@ -10876,31 +10876,31 @@ class TestOther : public TestFixture {
1087610876
"unsigned char c;\n"
1087710877
"do {\n"
1087810878
" c = fgetc (pFile);\n"
10879-
"} while (c != EOF)"
10879+
"} while (c != EOF);"
1088010880
"}");
1088110881
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.\n", errout_str());
1088210882

1088310883
check("void f (FILE * pFile){\n"
1088410884
"char c;\n"
1088510885
"do {\n"
1088610886
" c = fgetc (pFile);\n"
10887-
"} while (EOF != c)"
10887+
"} while (EOF != c);"
1088810888
"}");
1088910889
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.\n", errout_str());
1089010890

1089110891
check("void f (FILE * pFile){\n"
1089210892
"signed char c;\n"
1089310893
"do {\n"
1089410894
" c = fgetc (pFile);\n"
10895-
"} while (EOF != c)"
10895+
"} while (EOF != c);"
1089610896
"}");
1089710897
ASSERT_EQUALS("", errout_str());
1089810898

1089910899
check("void f (FILE * pFile){\n"
1090010900
"int i;\n"
1090110901
"do {\n"
1090210902
" i = fgetc (pFile);\n"
10903-
"} while (i != EOF)"
10903+
"} while (i != EOF);"
1090410904
"}");
1090510905
ASSERT_EQUALS("", errout_str());
1090610906

0 commit comments

Comments
 (0)