Added unit test for #1473.

This commit is contained in:
PKEuS 2014-03-28 11:34:23 +01:00
parent 3950a62ef2
commit 838cac5a3a
1 changed files with 7 additions and 0 deletions

View File

@ -473,6 +473,13 @@ private:
" fclose(a.f2);\n"
"}");
ASSERT_EQUALS("", errout.str());
// #1473
check("void foo() {\n"
" FILE *a = fopen(\"aa\", \"r\");\n"
" while (fclose(a)) {}\n"
"}");
ASSERT_EQUALS("[test.cpp:3]: (error) Used file that is not opened.\n", errout.str());
}
void fileIOwithoutPositioning() {