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.

122 lines
3.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2012 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 <stdio.h>
  11. #include <string>
  12. #include <vector>
  13. #include "modules/audio_coding/include/audio_coding_module.h"
  14. #include "modules/audio_coding/test/EncodeDecodeTest.h"
  15. #include "modules/audio_coding/test/PacketLossTest.h"
  16. #include "modules/audio_coding/test/TestAllCodecs.h"
  17. #include "modules/audio_coding/test/TestRedFec.h"
  18. #include "modules/audio_coding/test/TestStereo.h"
  19. #include "modules/audio_coding/test/TestVADDTX.h"
  20. #include "modules/audio_coding/test/TwoWayCommunication.h"
  21. #include "modules/audio_coding/test/iSACTest.h"
  22. #include "modules/audio_coding/test/opus_test.h"
  23. #include "test/gtest.h"
  24. #include "test/testsupport/file_utils.h"
  25. TEST(AudioCodingModuleTest, TestAllCodecs) {
  26. webrtc::TestAllCodecs().Perform();
  27. }
  28. #if defined(WEBRTC_ANDROID)
  29. TEST(AudioCodingModuleTest, DISABLED_TestEncodeDecode) {
  30. #else
  31. TEST(AudioCodingModuleTest, TestEncodeDecode) {
  32. #endif
  33. webrtc::EncodeDecodeTest().Perform();
  34. }
  35. TEST(AudioCodingModuleTest, TestRedFec) {
  36. webrtc::TestRedFec().Perform();
  37. }
  38. #if defined(WEBRTC_ANDROID)
  39. TEST(AudioCodingModuleTest, DISABLED_TestIsac) {
  40. #else
  41. TEST(AudioCodingModuleTest, TestIsac) {
  42. #endif
  43. webrtc::ISACTest().Perform();
  44. }
  45. #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
  46. defined(WEBRTC_CODEC_ILBC)
  47. #if defined(WEBRTC_ANDROID)
  48. TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) {
  49. #else
  50. TEST(AudioCodingModuleTest, TwoWayCommunication) {
  51. #endif
  52. webrtc::TwoWayCommunication().Perform();
  53. }
  54. #endif
  55. // Disabled on ios as flaky, see https://crbug.com/webrtc/7057
  56. #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
  57. TEST(AudioCodingModuleTest, DISABLED_TestStereo) {
  58. #else
  59. TEST(AudioCodingModuleTest, TestStereo) {
  60. #endif
  61. webrtc::TestStereo().Perform();
  62. }
  63. TEST(AudioCodingModuleTest, TestWebRtcVadDtx) {
  64. webrtc::TestWebRtcVadDtx().Perform();
  65. }
  66. TEST(AudioCodingModuleTest, TestOpusDtx) {
  67. webrtc::TestOpusDtx().Perform();
  68. }
  69. // Disabled on ios as flaky, see https://crbug.com/webrtc/7057
  70. #if defined(WEBRTC_IOS)
  71. TEST(AudioCodingModuleTest, DISABLED_TestOpus) {
  72. #else
  73. TEST(AudioCodingModuleTest, TestOpus) {
  74. #endif
  75. webrtc::OpusTest().Perform();
  76. }
  77. TEST(AudioCodingModuleTest, TestPacketLoss) {
  78. webrtc::PacketLossTest(1, 10, 10, 1).Perform();
  79. }
  80. TEST(AudioCodingModuleTest, TestPacketLossBurst) {
  81. webrtc::PacketLossTest(1, 10, 10, 2).Perform();
  82. }
  83. // Disabled on ios as flake, see https://crbug.com/webrtc/7057
  84. #if defined(WEBRTC_IOS)
  85. TEST(AudioCodingModuleTest, DISABLED_TestPacketLossStereo) {
  86. #else
  87. TEST(AudioCodingModuleTest, TestPacketLossStereo) {
  88. #endif
  89. webrtc::PacketLossTest(2, 10, 10, 1).Perform();
  90. }
  91. // Disabled on ios as flake, see https://crbug.com/webrtc/7057
  92. #if defined(WEBRTC_IOS)
  93. TEST(AudioCodingModuleTest, DISABLED_TestPacketLossStereoBurst) {
  94. #else
  95. TEST(AudioCodingModuleTest, TestPacketLossStereoBurst) {
  96. #endif
  97. webrtc::PacketLossTest(2, 10, 10, 2).Perform();
  98. }
  99. // The full API test is too long to run automatically on bots, but can be used
  100. // for offline testing. User interaction is needed.
  101. #ifdef ACM_TEST_FULL_API
  102. TEST(AudioCodingModuleTest, TestAPI) {
  103. webrtc::APITest().Perform();
  104. }
  105. #endif