2013-07-10 00:45:36 +00:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2013 The WebRTC project authors. All Rights Reserved.
|
2013-07-10 00:45:36 +00:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2013-07-10 00:45:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "pc/local_audio_source.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
#include <optional>
|
|
|
|
|
|
2018-11-28 16:47:49 +01:00
|
|
|
#include "test/gtest.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
using webrtc::LocalAudioSource;
|
|
|
|
|
|
2016-03-04 02:51:39 -08:00
|
|
|
TEST(LocalAudioSourceTest, InitWithAudioOptions) {
|
|
|
|
|
cricket::AudioOptions audio_options;
|
2017-11-16 10:54:27 +01:00
|
|
|
audio_options.highpass_filter = true;
|
2017-02-10 21:26:48 -08:00
|
|
|
rtc::scoped_refptr<LocalAudioSource> source =
|
|
|
|
|
LocalAudioSource::Create(&audio_options);
|
2017-11-16 10:54:27 +01:00
|
|
|
EXPECT_EQ(true, source->options().highpass_filter);
|
2016-03-04 02:51:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(LocalAudioSourceTest, InitWithNoOptions) {
|
|
|
|
|
rtc::scoped_refptr<LocalAudioSource> source =
|
2018-05-21 11:23:35 +02:00
|
|
|
LocalAudioSource::Create(nullptr);
|
2024-08-29 13:00:40 +00:00
|
|
|
EXPECT_EQ(std::nullopt, source->options().highpass_filter);
|
2016-03-04 02:51:39 -08:00
|
|
|
}
|