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

Side by Side Diff: webrtc/modules/audio_processing/transient/wpd_node_unittest.cc

Issue 1698843003: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/transient/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compile fix Created 4 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
11 #include "webrtc/modules/audio_processing/transient/wpd_node.h" 11 #include "webrtc/modules/audio_processing/transient/wpd_node.h"
12 12
13 #include <string.h> 13 #include <string.h>
14 14
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webrtc/base/scoped_ptr.h"
17 16
18 namespace webrtc { 17 namespace webrtc {
19 18
20 static const size_t kDataLength = 5; 19 static const size_t kDataLength = 5;
21 static const float kTolerance = 0.0001f; 20 static const float kTolerance = 0.0001f;
22 21
23 static const size_t kParentDataLength = kDataLength * 2; 22 static const size_t kParentDataLength = kDataLength * 2;
24 static const float kParentData[kParentDataLength] = 23 static const float kParentData[kParentDataLength] =
25 {1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f}; 24 {1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f};
26 25
(...skipping 30 matching lines...) Expand all
57 56
58 TEST(WPDNodeTest, ExpectedErrorReturnValue) { 57 TEST(WPDNodeTest, ExpectedErrorReturnValue) {
59 WPDNode node(kDataLength, kCoefficients, kCoefficientsLength); 58 WPDNode node(kDataLength, kCoefficients, kCoefficientsLength);
60 EXPECT_EQ(-1, node.Update(kParentData, kParentDataLength - 1)); 59 EXPECT_EQ(-1, node.Update(kParentData, kParentDataLength - 1));
61 EXPECT_EQ(-1, node.Update(NULL, kParentDataLength)); 60 EXPECT_EQ(-1, node.Update(NULL, kParentDataLength));
62 EXPECT_EQ(-1, node.set_data(kParentData, kDataLength - 1)); 61 EXPECT_EQ(-1, node.set_data(kParentData, kDataLength - 1));
63 EXPECT_EQ(-1, node.set_data(NULL, kDataLength)); 62 EXPECT_EQ(-1, node.set_data(NULL, kDataLength));
64 } 63 }
65 64
66 } // namespace webrtc 65 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698