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

Unified Diff: talk/app/webrtc/localaudiosource_unittest.cc

Issue 1430433004: Replace rtc::cricket::Settable with rtc::Maybe (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/localaudiosource.cc ('k') | talk/app/webrtc/videosource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/localaudiosource_unittest.cc
diff --git a/talk/app/webrtc/localaudiosource_unittest.cc b/talk/app/webrtc/localaudiosource_unittest.cc
index 8e05c182874aec57ff5d9a6388b5ca79ac5dc764..d36b7cd9c22e2b99b91a527d9ed8de8ef0025424 100644
--- a/talk/app/webrtc/localaudiosource_unittest.cc
+++ b/talk/app/webrtc/localaudiosource_unittest.cc
@@ -58,23 +58,14 @@ TEST(LocalAudioSourceTest, SetValidOptions) {
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
- bool value;
- EXPECT_TRUE(source->options().echo_cancellation.Get(&value));
- EXPECT_FALSE(value);
- EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_TRUE(source->options().delay_agnostic_aec.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_TRUE(source->options().auto_gain_control.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_TRUE(source->options().experimental_agc.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_TRUE(source->options().noise_suppression.Get(&value));
- EXPECT_FALSE(value);
- EXPECT_TRUE(source->options().highpass_filter.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_TRUE(source->options().aec_dump.Get(&value));
- EXPECT_TRUE(value);
+ EXPECT_EQ(rtc::Maybe<bool>(false), source->options().echo_cancellation);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().extended_filter_aec);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().delay_agnostic_aec);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().auto_gain_control);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().experimental_agc);
+ EXPECT_EQ(rtc::Maybe<bool>(false), source->options().noise_suppression);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().highpass_filter);
+ EXPECT_EQ(rtc::Maybe<bool>(true), source->options().aec_dump);
}
TEST(LocalAudioSourceTest, OptionNotSet) {
@@ -82,8 +73,7 @@ TEST(LocalAudioSourceTest, OptionNotSet) {
rtc::scoped_refptr<LocalAudioSource> source =
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
- bool value;
- EXPECT_FALSE(source->options().highpass_filter.Get(&value));
+ EXPECT_EQ(rtc::Maybe<bool>(), source->options().highpass_filter);
}
TEST(LocalAudioSourceTest, MandatoryOverridesOptional) {
@@ -97,9 +87,7 @@ TEST(LocalAudioSourceTest, MandatoryOverridesOptional) {
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
&constraints);
- bool value;
- EXPECT_TRUE(source->options().echo_cancellation.Get(&value));
- EXPECT_FALSE(value);
+ EXPECT_EQ(rtc::Maybe<bool>(false), source->options().echo_cancellation);
}
TEST(LocalAudioSourceTest, InvalidOptional) {
@@ -112,9 +100,7 @@ TEST(LocalAudioSourceTest, InvalidOptional) {
&constraints);
EXPECT_EQ(MediaSourceInterface::kLive, source->state());
- bool value;
- EXPECT_TRUE(source->options().highpass_filter.Get(&value));
- EXPECT_FALSE(value);
+ EXPECT_EQ(rtc::Maybe<bool>(false), source->options().highpass_filter);
}
TEST(LocalAudioSourceTest, InvalidMandatory) {
@@ -127,7 +113,5 @@ TEST(LocalAudioSourceTest, InvalidMandatory) {
&constraints);
EXPECT_EQ(MediaSourceInterface::kLive, source->state());
- bool value;
- EXPECT_TRUE(source->options().highpass_filter.Get(&value));
- EXPECT_FALSE(value);
+ EXPECT_EQ(rtc::Maybe<bool>(false), source->options().highpass_filter);
}
« no previous file with comments | « talk/app/webrtc/localaudiosource.cc ('k') | talk/app/webrtc/videosource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698