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

Side by Side Diff: webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc

Issue 3011943002: Move optional.h to webrtc/api/ (Closed)
Patch Set: Created 3 years, 3 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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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/aec3/render_delay_controller_metrics.h " 11 #include "webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h "
12 #include "webrtc/api/optional.h"
12 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" 13 #include "webrtc/modules/audio_processing/aec3/aec3_common.h"
13 #include "webrtc/rtc_base/optional.h"
14 14
15 #include "webrtc/test/gtest.h" 15 #include "webrtc/test/gtest.h"
16 16
17 namespace webrtc { 17 namespace webrtc {
18 18
19 // Verify the general functionality of RenderDelayControllerMetrics. 19 // Verify the general functionality of RenderDelayControllerMetrics.
20 TEST(RenderDelayControllerMetrics, NormalUsage) { 20 TEST(RenderDelayControllerMetrics, NormalUsage) {
21 RenderDelayControllerMetrics metrics; 21 RenderDelayControllerMetrics metrics;
22 22
23 for (int j = 0; j < 3; ++j) { 23 for (int j = 0; j < 3; ++j) {
24 for (int k = 0; k < kMetricsReportingIntervalBlocks - 1; ++k) { 24 for (int k = 0; k < kMetricsReportingIntervalBlocks - 1; ++k) {
25 metrics.Update(rtc::Optional<size_t>(), 0); 25 metrics.Update(rtc::Optional<size_t>(), 0);
26 EXPECT_FALSE(metrics.MetricsReported()); 26 EXPECT_FALSE(metrics.MetricsReported());
27 } 27 }
28 metrics.Update(rtc::Optional<size_t>(), 0); 28 metrics.Update(rtc::Optional<size_t>(), 0);
29 EXPECT_TRUE(metrics.MetricsReported()); 29 EXPECT_TRUE(metrics.MetricsReported());
30 } 30 }
31 } 31 }
32 32
33 } // namespace webrtc 33 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698