Make flush public

This commit is contained in:
Victor Zverovich
2021-07-30 07:02:49 -07:00
parent f1794a8853
commit bba0a9d962
2 changed files with 14 additions and 6 deletions
+8
View File
@@ -336,6 +336,14 @@ TEST(ostream_test, truncate) {
EXPECT_EQ("foo", read(in, 4));
}
TEST(ostream_test, flush) {
auto out = fmt::output_file("test-file");
out.print("x");
out.flush();
auto in = fmt::file("test-file", file::RDONLY);
EXPECT_READ(in, "x");
}
TEST(file_test, default_ctor) {
file f;
EXPECT_EQ(-1, f.descriptor());