From 2b7ef7156ab24ba95a521f695d187cf4f1bac3dc Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 29 Sep 2017 17:12:50 +0300 Subject: [PATCH] Improve test coverage for accessing closed files --- test/testio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/testio.cpp b/test/testio.cpp index 60863c300..6106853f1 100644 --- a/test/testio.cpp +++ b/test/testio.cpp @@ -386,12 +386,14 @@ private: " fread(buffer, 5, 6, f);\n" " ungetc('a', f);\n" " ungetwc(L'a', f);\n" + " rewind(f);\n" "}"); ASSERT_EQUALS("[test.cpp:3]: (error) Used file that is not opened.\n" "[test.cpp:4]: (error) Used file that is not opened.\n" "[test.cpp:5]: (error) Used file that is not opened.\n" "[test.cpp:6]: (error) Used file that is not opened.\n" - "[test.cpp:7]: (error) Used file that is not opened.\n", errout.str()); + "[test.cpp:7]: (error) Used file that is not opened.\n" + "[test.cpp:8]: (error) Used file that is not opened.\n", errout.str()); check("void foo(FILE*& f) {\n" " if(!ferror(f)) {\n"