Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/utility/ivf_file_writer.cc ('k') | webrtc/system_wrappers/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc
diff --git a/webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc b/webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc
index 303502487d8fc590b4e210c46c3a95aad5d43295..ae1283b78d02abe2301b3a8f3be3fa98e81a961e 100644
--- a/webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc
+++ b/webrtc/modules/video_coding/utility/ivf_file_writer_unittest.cc
@@ -69,6 +69,7 @@ class IvfFileWriterTest : public ::testing::Test {
int height,
uint32_t num_frames,
bool use_capture_tims_ms) {
+ ASSERT_TRUE(file->is_open());
uint8_t data[kHeaderSize];
ASSERT_EQ(kHeaderSize, file->Read(data, kHeaderSize));
@@ -118,13 +119,12 @@ class IvfFileWriterTest : public ::testing::Test {
EXPECT_TRUE(file_writer_->Close());
std::unique_ptr<FileWrapper> out_file(FileWrapper::Create());
- ASSERT_EQ(0, out_file->OpenFile(file_name_.c_str(), true));
+ ASSERT_TRUE(out_file->OpenFile(file_name_.c_str(), true));
VerifyIvfHeader(out_file.get(), fourcc, kWidth, kHeight, kNumFrames,
use_capture_tims_ms);
VerifyDummyTestFrames(out_file.get(), kNumFrames);
- out_file->Flush();
- EXPECT_EQ(0, out_file->CloseFile());
+ out_file->CloseFile();
bool file_removed = false;
for (int i = 0; i < kMaxFileRetries; ++i) {
@@ -151,7 +151,7 @@ class IvfFileWriterTest : public ::testing::Test {
if (file_wrapper.get() != nullptr)
rtc::Thread::SleepMs(1000);
file_wrapper.reset(FileWrapper::Create());
- file_exists = file_wrapper->OpenFile(file_name_.c_str(), true) == 0;
+ file_exists = file_wrapper->OpenFile(file_name_.c_str(), true);
file_wrapper->CloseFile();
} while (file_exists != expected && ++iterations < kMaxFileRetries);
return file_exists;
« no previous file with comments | « webrtc/modules/video_coding/utility/ivf_file_writer.cc ('k') | webrtc/system_wrappers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698