blob: 76d3b366c3efaf7951a2e2f398980fa742971a0d [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:361/*
kjellanderb24317b2016-02-10 15:54:432 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:363 *
kjellanderb24317b2016-02-10 15:54:434 * 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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:369 */
10
Steve Anton10542f22019-01-11 17:11:0011#include "pc/local_audio_source.h"
henrike@webrtc.org28e20752013-07-10 00:45:3612
Yves Gerey3e707812018-11-28 15:47:4913#include "absl/types/optional.h"
14#include "test/gtest.h"
henrike@webrtc.org28e20752013-07-10 00:45:3615
16using webrtc::LocalAudioSource;
henrike@webrtc.org28e20752013-07-10 00:45:3617
htaa2a49d92016-03-04 10:51:3918TEST(LocalAudioSourceTest, InitWithAudioOptions) {
19 cricket::AudioOptions audio_options;
Oskar Sundbom36f8f3e2017-11-16 09:54:2720 audio_options.highpass_filter = true;
deadbeef757146b2017-02-11 05:26:4821 rtc::scoped_refptr<LocalAudioSource> source =
22 LocalAudioSource::Create(&audio_options);
Oskar Sundbom36f8f3e2017-11-16 09:54:2723 EXPECT_EQ(true, source->options().highpass_filter);
htaa2a49d92016-03-04 10:51:3924}
25
26TEST(LocalAudioSourceTest, InitWithNoOptions) {
27 rtc::scoped_refptr<LocalAudioSource> source =
Niels Möller2d02e082018-05-21 09:23:3528 LocalAudioSource::Create(nullptr);
Danil Chapovalov66cadcc2018-06-19 14:47:4329 EXPECT_EQ(absl::nullopt, source->options().highpass_filter);
htaa2a49d92016-03-04 10:51:3930}