Skip to content

Commit f7aa74e

Browse files
committed
Add context and EOF check to test_stream_io
1 parent 8f3016d commit f7aa74e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_stream_io.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ std::basic_string<Char> read_file(std::basic_istream<Char>& in)
3333
Char c;
3434
while(in.get(c))
3535
res += c;
36+
TEST(in.eof());
3637
return res;
3738
}
3839

@@ -45,6 +46,7 @@ void test_ok(const std::string& content, const std::locale& l, std::basic_string
4546

4647
{
4748
const std::string file_path = boost::locale::test::exe_name + "-test_read.txt";
49+
TEST_CONTEXT("File: " << file_path);
4850
remove_file_on_exit _(file_path);
4951
{
5052
std::ofstream out_file(file_path, std::ios::binary);
@@ -57,6 +59,7 @@ void test_ok(const std::string& content, const std::locale& l, std::basic_string
5759

5860
{
5961
const std::string file_path = boost::locale::test::exe_name + "-test_write.txt";
62+
TEST_CONTEXT("File: " << file_path);
6063
remove_file_on_exit _(file_path);
6164
{
6265
stream_type out_file(file_path, stream_type::out);

0 commit comments

Comments
 (0)