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

Side by Side Diff: webrtc/tools/frame_analyzer/video_quality_analysis_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 12 matching lines...) Expand all
23 namespace test { 23 namespace test {
24 24
25 // Setup a log file to write the output to instead of stdout because we don't 25 // Setup a log file to write the output to instead of stdout because we don't
26 // want those numbers to be picked up as perf numbers. 26 // want those numbers to be picked up as perf numbers.
27 class VideoQualityAnalysisTest : public ::testing::Test { 27 class VideoQualityAnalysisTest : public ::testing::Test {
28 protected: 28 protected:
29 static void SetUpTestCase() { 29 static void SetUpTestCase() {
30 std::string log_filename = webrtc::test::OutputPath() + 30 std::string log_filename = webrtc::test::OutputPath() +
31 "VideoQualityAnalysisTest.log"; 31 "VideoQualityAnalysisTest.log";
32 logfile_ = fopen(log_filename.c_str(), "w"); 32 logfile_ = fopen(log_filename.c_str(), "w");
33 ASSERT_TRUE(logfile_ != NULL); 33 ASSERT_TRUE(logfile_ != nullptr);
34 } 34 }
35 static void TearDownTestCase() { 35 static void TearDownTestCase() {
36 ASSERT_EQ(0, fclose(logfile_)); 36 ASSERT_EQ(0, fclose(logfile_));
37 } 37 }
38 static FILE* logfile_; 38 static FILE* logfile_;
39 }; 39 };
40 FILE* VideoQualityAnalysisTest::logfile_ = NULL; 40 FILE* VideoQualityAnalysisTest::logfile_ = nullptr;
41 41
42 TEST_F(VideoQualityAnalysisTest, MatchExtractedY4mFrame) { 42 TEST_F(VideoQualityAnalysisTest, MatchExtractedY4mFrame) {
43 std::string video_file = 43 std::string video_file =
44 webrtc::test::ResourcePath("reference_less_video_test_file", "y4m"); 44 webrtc::test::ResourcePath("reference_less_video_test_file", "y4m");
45 45
46 std::string extracted_frame_from_video_file = 46 std::string extracted_frame_from_video_file =
47 webrtc::test::ResourcePath("video_quality_analysis_frame", "txt"); 47 webrtc::test::ResourcePath("video_quality_analysis_frame", "txt");
48 48
49 int frame_height = 720, frame_width = 1280; 49 int frame_height = 720, frame_width = 1280;
50 int frame_number = 2; 50 int frame_number = 2;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 stats_file << "frame_0004 0106\n"; 128 stats_file << "frame_0004 0106\n";
129 stats_file.close(); 129 stats_file.close();
130 130
131 PrintMaxRepeatedAndSkippedFrames(logfile_, "NormalStatsFile", 131 PrintMaxRepeatedAndSkippedFrames(logfile_, "NormalStatsFile",
132 stats_filename_ref, stats_filename); 132 stats_filename_ref, stats_filename);
133 } 133 }
134 134
135 135
136 } // namespace test 136 } // namespace test
137 } // namespace webrtc 137 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698