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

Side by Side Diff: webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc

Issue 2358993004: Enable the -Wundef warning for clang (Closed)
Patch Set: rebase Created 4 years, 2 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
11 // TODO(bjornv): Make this a comprehensive test. 11 // TODO(bjornv): Make this a comprehensive test.
12 12
13 #include "webrtc/modules/audio_processing/aec/echo_cancellation.h" 13 #include "webrtc/modules/audio_processing/aec/echo_cancellation.h"
14 14
15 #include <stdlib.h> 15 #include <stdlib.h>
16 #include <time.h> 16 #include <time.h>
17 17
18 #include "webrtc/modules/audio_processing/aec/aec_core.h" 18 #include "webrtc/modules/audio_processing/aec/aec_core.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "webrtc/test/gtest.h"
20 #include "webrtc/base/checks.h" 20 #include "webrtc/base/checks.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 TEST(EchoCancellationTest, CreateAndFreeHasExpectedBehavior) { 24 TEST(EchoCancellationTest, CreateAndFreeHasExpectedBehavior) {
25 void* handle = WebRtcAec_Create(); 25 void* handle = WebRtcAec_Create();
26 ASSERT_TRUE(handle); 26 ASSERT_TRUE(handle);
27 WebRtcAec_Free(nullptr); 27 WebRtcAec_Free(nullptr);
28 WebRtcAec_Free(handle); 28 WebRtcAec_Free(handle);
29 } 29 }
30 30
31 TEST(EchoCancellationTest, ApplyAecCoreHandle) { 31 TEST(EchoCancellationTest, ApplyAecCoreHandle) {
32 void* handle = WebRtcAec_Create(); 32 void* handle = WebRtcAec_Create();
33 ASSERT_TRUE(handle); 33 ASSERT_TRUE(handle);
34 EXPECT_TRUE(WebRtcAec_aec_core(NULL) == NULL); 34 EXPECT_TRUE(WebRtcAec_aec_core(NULL) == NULL);
35 AecCore* aec_core = WebRtcAec_aec_core(handle); 35 AecCore* aec_core = WebRtcAec_aec_core(handle);
36 EXPECT_TRUE(aec_core != NULL); 36 EXPECT_TRUE(aec_core != NULL);
37 // A simple test to verify that we can set and get a value from the lower 37 // A simple test to verify that we can set and get a value from the lower
38 // level |aec_core| handle. 38 // level |aec_core| handle.
39 int delay = 111; 39 int delay = 111;
40 WebRtcAec_SetSystemDelay(aec_core, delay); 40 WebRtcAec_SetSystemDelay(aec_core, delay);
41 EXPECT_EQ(delay, WebRtcAec_system_delay(aec_core)); 41 EXPECT_EQ(delay, WebRtcAec_system_delay(aec_core));
42 WebRtcAec_Free(handle); 42 WebRtcAec_Free(handle);
43 } 43 }
44 44
45 } // namespace webrtc 45 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc ('k') | webrtc/modules/audio_processing/aec/system_delay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698