Fixed IOStream reporting a file size of 0 for files that have been written, but not yet been flushed to disk.
This commit is contained in:
@@ -69,6 +69,11 @@ TEST_F( utDefaultIOStream, FileSizeTest ) {
|
||||
auto vflush = std::fflush( fs );
|
||||
ASSERT_EQ(vflush, 0);
|
||||
|
||||
std::fclose(fs);
|
||||
fs = std::fopen(fpath, "r");
|
||||
|
||||
ASSERT_NE(nullptr, fs);
|
||||
|
||||
TestDefaultIOStream myStream( fs, fpath);
|
||||
size_t size = myStream.FileSize();
|
||||
EXPECT_EQ( size, dataSize);
|
||||
|
||||
Reference in New Issue
Block a user