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

Unified Diff: webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc

Issue 2553693002: Comparison of videos with reference frame not starting from zero (Closed)
Patch Set: Added newline in debug prints for PrintMaxRepeatedAndSkippedFrames Created 3 years, 11 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/tools/frame_analyzer/video_quality_analysis.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
diff --git a/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc b/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
index 34c5fa77cb35dab3dcf94cc444466a1227506f5a..85d0b46e79f72879db7fa0f7053888d7fe19fc2a 100644
--- a/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
+++ b/webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc
@@ -85,24 +85,42 @@ TEST_F(VideoQualityAnalysisTest, PrintAnalysisResultsThreeFrames) {
}
TEST_F(VideoQualityAnalysisTest, PrintMaxRepeatedAndSkippedFramesInvalidFile) {
- std::string stats_filename = OutputPath() + "non-existing-stats-file.txt";
+ std::string stats_filename_ref =
+ OutputPath() + "non-existing-stats-file-1.txt";
+ std::string stats_filename = OutputPath() + "non-existing-stats-file-2.txt";
remove(stats_filename.c_str());
PrintMaxRepeatedAndSkippedFrames(logfile_, "NonExistingStatsFile",
- stats_filename);
+ stats_filename_ref, stats_filename);
}
TEST_F(VideoQualityAnalysisTest,
PrintMaxRepeatedAndSkippedFramesEmptyStatsFile) {
- std::string stats_filename = OutputPath() + "empty-stats.txt";
+ std::string stats_filename_ref = OutputPath() + "empty-stats-1.txt";
+ std::string stats_filename = OutputPath() + "empty-stats-2.txt";
std::ofstream stats_file;
+ stats_file.open(stats_filename_ref.c_str());
+ stats_file.close();
stats_file.open(stats_filename.c_str());
stats_file.close();
- PrintMaxRepeatedAndSkippedFrames(logfile_, "EmptyStatsFile", stats_filename);
+ PrintMaxRepeatedAndSkippedFrames(logfile_, "EmptyStatsFile",
+ stats_filename_ref, stats_filename);
}
TEST_F(VideoQualityAnalysisTest, PrintMaxRepeatedAndSkippedFramesNormalFile) {
- std::string stats_filename = OutputPath() + "stats.txt";
+ std::string stats_filename_ref = OutputPath() + "stats-1.txt";
+ std::string stats_filename = OutputPath() + "stats-2.txt";
std::ofstream stats_file;
+
+ stats_file.open(stats_filename_ref.c_str());
+ stats_file << "frame_0001 0100\n";
+ stats_file << "frame_0002 0101\n";
+ stats_file << "frame_0003 0102\n";
+ stats_file << "frame_0004 0103\n";
+ stats_file << "frame_0005 0106\n";
+ stats_file << "frame_0006 0107\n";
+ stats_file << "frame_0007 0108\n";
+ stats_file.close();
+
stats_file.open(stats_filename.c_str());
stats_file << "frame_0001 0100\n";
stats_file << "frame_0002 0101\n";
@@ -110,7 +128,8 @@ TEST_F(VideoQualityAnalysisTest, PrintMaxRepeatedAndSkippedFramesNormalFile) {
stats_file << "frame_0004 0106\n";
stats_file.close();
- PrintMaxRepeatedAndSkippedFrames(logfile_, "NormalStatsFile", stats_filename);
+ PrintMaxRepeatedAndSkippedFrames(logfile_, "NormalStatsFile",
+ stats_filename_ref, stats_filename);
}
« no previous file with comments | « webrtc/tools/frame_analyzer/video_quality_analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698