You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1022 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright 2013 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  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.
  9. */
  10. #include "pc/local_audio_source.h"
  11. #include "absl/types/optional.h"
  12. #include "test/gtest.h"
  13. using webrtc::LocalAudioSource;
  14. TEST(LocalAudioSourceTest, InitWithAudioOptions) {
  15. cricket::AudioOptions audio_options;
  16. audio_options.highpass_filter = true;
  17. rtc::scoped_refptr<LocalAudioSource> source =
  18. LocalAudioSource::Create(&audio_options);
  19. EXPECT_EQ(true, source->options().highpass_filter);
  20. }
  21. TEST(LocalAudioSourceTest, InitWithNoOptions) {
  22. rtc::scoped_refptr<LocalAudioSource> source =
  23. LocalAudioSource::Create(nullptr);
  24. EXPECT_EQ(absl::nullopt, source->options().highpass_filter);
  25. }