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

Unified Diff: webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc

Issue 1175903002: audio_processing: Create now returns a pointer to the object (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed review comments Created 5 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
Index: webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
diff --git a/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc b/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
index 6c325e0c518174c16a6b7cd83b7c938772169503..315ac3e9f95ffbdf6bb75535c048645cf7a24c32 100644
--- a/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
+++ b/webrtc/modules/audio_processing/aec/echo_cancellation_unittest.cc
@@ -20,22 +20,20 @@ extern "C" {
}
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/checks.h"
namespace webrtc {
TEST(EchoCancellationTest, CreateAndFreeHasExpectedBehavior) {
- EXPECT_EQ(-1, WebRtcAec_Create(NULL));
- void* handle = NULL;
- ASSERT_EQ(0, WebRtcAec_Create(&handle));
- EXPECT_TRUE(handle != NULL);
+ void* handle = WebRtcAec_Create();
+ ASSERT_TRUE(handle);
WebRtcAec_Free(nullptr);
WebRtcAec_Free(handle);
}
TEST(EchoCancellationTest, ApplyAecCoreHandle) {
- void* handle = NULL;
- ASSERT_EQ(0, WebRtcAec_Create(&handle));
- EXPECT_TRUE(handle != NULL);
+ void* handle = WebRtcAec_Create();
+ ASSERT_TRUE(handle);
EXPECT_TRUE(WebRtcAec_aec_core(NULL) == NULL);
AecCore* aec_core = WebRtcAec_aec_core(handle);
EXPECT_TRUE(aec_core != NULL);

Powered by Google App Engine
This is Rietveld 408576698