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

Unified Diff: webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc

Issue 2292863002: Introduced new scheme for controlling the functionality inside the audio processing module (Closed)
Patch Set: Fixed bad merge Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc b/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
index c470c2fad7b5bd4c2371bbf49e4e1322141d49a2..f5cea0dbccd9357717d634c9d4e1862b742ffc4d 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
+++ b/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
@@ -68,6 +68,25 @@ void RunBitexactnessTest(int sample_rate_hz,
} // namespace
+TEST(LevelControlConfigTest, ToStringEnabled) {
+ AudioProcessing::Config config;
+ config.level_controller.enabled = true;
+ EXPECT_EQ("{enabled: true}",
+ LevelController::ToString(config.level_controller));
+}
+
+TEST(LevelControlConfigTest, ToStringNotEnabled) {
+ AudioProcessing::Config config;
+ config.level_controller.enabled = false;
+ EXPECT_EQ("{enabled: false}",
+ LevelController::ToString(config.level_controller));
+}
+
+TEST(LevelControlConfigTest, DefaultValue) {
+ AudioProcessing::Config config;
+ EXPECT_FALSE(config.level_controller.enabled);
+}
+
TEST(LevelControlBitExactnessTest, DISABLED_Mono8kHz) {
const float kOutputReference[] = {-0.013939f, -0.012154f, -0.009054f};
RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 1,

Powered by Google App Engine
This is Rietveld 408576698