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

Side by Side Diff: webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #include "webrtc/modules/audio_processing/include/audio_processing.h" 11 #include "webrtc/modules/audio_processing/include/audio_processing.h"
12 #include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixtu re.h" 12 #include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixtu re.h"
13 13
14 class TestErrorObserver : public webrtc::VoiceEngineObserver { 14 class TestErrorObserver : public webrtc::VoiceEngineObserver {
15 public: 15 public:
16 TestErrorObserver() {} 16 TestErrorObserver() {}
17 virtual ~TestErrorObserver() {} 17 virtual ~TestErrorObserver() {}
18 void CallbackOnError(int channel, int error_code) { 18 void CallbackOnError(int channel, int error_code) {
19 ADD_FAILURE() << "Unexpected error on channel " << channel << 19 ADD_FAILURE() << "Unexpected error on channel " << channel <<
20 ": error code " << error_code; 20 ": error code " << error_code;
21 } 21 }
22 }; 22 };
23 23
24 AfterInitializationFixture::AfterInitializationFixture() 24 AfterInitializationFixture::AfterInitializationFixture()
25 : error_observer_(new TestErrorObserver()) { 25 : error_observer_(new TestErrorObserver()) {
26 webrtc::Config config; 26 webrtc::Config config;
27 config.Set<webrtc::ExperimentalAgc>(new webrtc::ExperimentalAgc(false)); 27 config.Set<webrtc::ExperimentalAgc>(new webrtc::ExperimentalAgc(false));
28 webrtc::AudioProcessing* audioproc = webrtc::AudioProcessing::Create(config); 28 webrtc::AudioProcessing* audioproc = webrtc::AudioProcessing::Create(config);
29 29
30 EXPECT_EQ(0, voe_base_->Init(NULL, audioproc)); 30 EXPECT_EQ(0, voe_base_->Init(nullptr, audioproc));
31 EXPECT_EQ(0, voe_base_->RegisterVoiceEngineObserver(*error_observer_)); 31 EXPECT_EQ(0, voe_base_->RegisterVoiceEngineObserver(*error_observer_));
32 } 32 }
33 33
34 AfterInitializationFixture::~AfterInitializationFixture() { 34 AfterInitializationFixture::~AfterInitializationFixture() {
35 EXPECT_EQ(0, voe_base_->DeRegisterVoiceEngineObserver()); 35 EXPECT_EQ(0, voe_base_->DeRegisterVoiceEngineObserver());
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698