Skip to content

Commit

Permalink
Check size mid-write, as we did originally
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Jul 18, 2023
1 parent bbe05ea commit 8c6327d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packager/file/file_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,15 @@ TEST_F(LocalFileTest, UnicodePath) {
File* file = File::Open(local_file_name_.c_str(), "w");
ASSERT_TRUE(file != NULL);
EXPECT_EQ(kDataSize, file->Write(&data_[0], kDataSize));

// Check the size.
EXPECT_EQ(kDataSize, file->Size());
ASSERT_TRUE(file->Close());

// Open file using File API.
file = File::Open(local_file_name_.c_str(), "r");
ASSERT_TRUE(file != NULL);

// Check the size.
EXPECT_EQ(kDataSize, file->Size());

// Read the entire file.
std::string read_data(kDataSize, 0);
EXPECT_EQ(kDataSize, file->Read(&read_data[0], kDataSize));
Expand Down

0 comments on commit 8c6327d

Please sign in to comment.