| Index: webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
|
| diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
|
| index 8de6c9100d3cd243257555aa1ef5fc04a8d87c40..6a2e44102709b5e93fe5f0cc5023893f1f1a89b9 100644
|
| --- a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
|
| +++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
|
| @@ -41,7 +41,6 @@
|
| #include "webrtc/system_wrappers/include/event_wrapper.h"
|
| #include "webrtc/system_wrappers/include/sleep.h"
|
| #include "webrtc/test/testsupport/fileutils.h"
|
| -#include "webrtc/test/testsupport/gtest_disable.h"
|
|
|
| using ::testing::AtLeast;
|
| using ::testing::Invoke;
|
| @@ -238,7 +237,11 @@ class AudioCodingModuleTestOldApi : public ::testing::Test {
|
|
|
| // Check if the statistics are initialized correctly. Before any call to ACM
|
| // all fields have to be zero.
|
| -TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) {
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AudioCodingModuleTestOldApi, DISABLED_InitializedToZero) {
|
| +#else
|
| +TEST_F(AudioCodingModuleTestOldApi, InitializedToZero) {
|
| +#endif
|
| RegisterCodec();
|
| AudioDecodingCallStats stats;
|
| acm_->GetDecodingCallStatistics(&stats);
|
| @@ -253,7 +256,11 @@ TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) {
|
| // Insert some packets and pull audio. Check statistics are valid. Then,
|
| // simulate packet loss and check if PLC and PLC-to-CNG statistics are
|
| // correctly updated.
|
| -TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) {
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AudioCodingModuleTestOldApi, DISABLED_NetEqCalls) {
|
| +#else
|
| +TEST_F(AudioCodingModuleTestOldApi, NetEqCalls) {
|
| +#endif
|
| RegisterCodec();
|
| AudioDecodingCallStats stats;
|
| const int kNumNormalCalls = 10;
|
| @@ -320,15 +327,9 @@ TEST_F(AudioCodingModuleTestOldApi, TransportCallbackIsInvokedForEachPacket) {
|
| }
|
|
|
| #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
|
| -#define IF_ISAC(x) x
|
| -#else
|
| -#define IF_ISAC(x) DISABLED_##x
|
| -#endif
|
| -
|
| // Verifies that the RTP timestamp series is not reset when the codec is
|
| // changed.
|
| -TEST_F(AudioCodingModuleTestOldApi,
|
| - IF_ISAC(TimestampSeriesContinuesWhenCodecChanges)) {
|
| +TEST_F(AudioCodingModuleTestOldApi, TimestampSeriesContinuesWhenCodecChanges) {
|
| RegisterCodec(); // This registers the default codec.
|
| uint32_t expected_ts = input_frame_.timestamp_;
|
| int blocks_per_packet = codec_.pacsize / (kSampleRateHz / 100);
|
| @@ -360,6 +361,7 @@ TEST_F(AudioCodingModuleTestOldApi,
|
| expected_ts += codec_.pacsize;
|
| }
|
| }
|
| +#endif
|
|
|
| // Introduce this class to set different expectations on the number of encoded
|
| // bytes. This class expects all encoded packets to be 9 bytes (matching one
|
| @@ -582,7 +584,11 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
|
| rtc::scoped_ptr<SimulatedClock> fake_clock_;
|
| };
|
|
|
| -TEST_F(AudioCodingModuleMtTestOldApi, DISABLED_ON_IOS(DoTest)) {
|
| +#if defined(WEBRTC_IOS)
|
| +TEST_F(AudioCodingModuleMtTestOldApi, DISABLED_DoTest) {
|
| +#else
|
| +TEST_F(AudioCodingModuleMtTestOldApi, DoTest) {
|
| +#endif
|
| EXPECT_EQ(kEventSignaled, RunTest());
|
| }
|
|
|
| @@ -686,9 +692,15 @@ class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi {
|
| test::AudioLoop audio_loop_;
|
| };
|
|
|
| -TEST_F(AcmIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) {
|
| +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
|
| +#if defined(WEBRTC_IOS)
|
| +TEST_F(AcmIsacMtTestOldApi, DISABLED_DoTest) {
|
| +#else
|
| +TEST_F(AcmIsacMtTestOldApi, DoTest) {
|
| +#endif
|
| EXPECT_EQ(kEventSignaled, RunTest());
|
| }
|
| +#endif
|
|
|
| class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi {
|
| protected:
|
| @@ -838,9 +850,15 @@ class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi {
|
| test::AudioLoop audio_loop_;
|
| };
|
|
|
| -TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) {
|
| +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
|
| +#if defined(WEBRTC_IOS)
|
| +TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_DoTest) {
|
| +#else
|
| +TEST_F(AcmReRegisterIsacMtTestOldApi, DoTest) {
|
| +#endif
|
| EXPECT_EQ(kEventSignaled, RunTest());
|
| }
|
| +#endif
|
|
|
| // Disabling all of these tests on iOS until file support has been added.
|
| // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details.
|
| @@ -1194,7 +1212,8 @@ class AcmSenderBitExactnessOldApi : public ::testing::Test,
|
| rtc::Md5Digest payload_checksum_;
|
| };
|
|
|
| -TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) {
|
| +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
|
| +TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "0b58f9eeee43d5891f5f6c75e77984a3",
|
| @@ -1209,7 +1228,7 @@ TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) {
|
| 33, test::AcmReceiveTestOldApi::kMonoOutput);
|
| }
|
|
|
| -TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) {
|
| +TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "1ad29139a04782a33daad8c2b9b35875",
|
| @@ -1223,15 +1242,14 @@ TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) {
|
| "9e0a0ab743ad987b55b8e14802769c56"),
|
| 16, test::AcmReceiveTestOldApi::kMonoOutput);
|
| }
|
| +#endif
|
|
|
| -#ifdef WEBRTC_CODEC_ISAC
|
| -#define IF_ISAC_FLOAT(x) x
|
| +#if defined(WEBRTC_CODEC_ISAC)
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AcmSenderBitExactnessOldApi, DISABLED_IsacSwb30ms) {
|
| #else
|
| -#define IF_ISAC_FLOAT(x) DISABLED_##x
|
| +TEST_F(AcmSenderBitExactnessOldApi, IsacSwb30ms) {
|
| #endif
|
| -
|
| -TEST_F(AcmSenderBitExactnessOldApi,
|
| - DISABLED_ON_ANDROID(IF_ISAC_FLOAT(IsacSwb30ms))) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "5683b58da0fbf2063c7adc2e6bfb3fb8",
|
| @@ -1243,6 +1261,7 @@ TEST_F(AcmSenderBitExactnessOldApi,
|
| "android_arm64_payload"),
|
| 33, test::AcmReceiveTestOldApi::kMonoOutput);
|
| }
|
| +#endif
|
|
|
| TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80));
|
| @@ -1324,13 +1343,12 @@ TEST_F(AcmSenderBitExactnessOldApi, Pcma_stereo_20ms) {
|
| test::AcmReceiveTestOldApi::kStereoOutput);
|
| }
|
|
|
| -#ifdef WEBRTC_CODEC_ILBC
|
| -#define IF_ILBC(x) x
|
| +#if defined(WEBRTC_CODEC_ILBC)
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AcmSenderBitExactnessOldApi, DISABLED_Ilbc_30ms) {
|
| #else
|
| -#define IF_ILBC(x) DISABLED_##x
|
| +TEST_F(AcmSenderBitExactnessOldApi, Ilbc_30ms) {
|
| #endif
|
| -
|
| -TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "7b6ec10910debd9af08011d3ed5249f7",
|
| @@ -1342,14 +1360,14 @@ TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) {
|
| "android_arm64_payload"),
|
| 33, test::AcmReceiveTestOldApi::kMonoOutput);
|
| }
|
| +#endif
|
|
|
| -#ifdef WEBRTC_CODEC_G722
|
| -#define IF_G722(x) x
|
| +#if defined(WEBRTC_CODEC_G722)
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AcmSenderBitExactnessOldApi, DISABLED_G722_20ms) {
|
| #else
|
| -#define IF_G722(x) DISABLED_##x
|
| +TEST_F(AcmSenderBitExactnessOldApi, G722_20ms) {
|
| #endif
|
| -
|
| -TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "7d759436f2533582950d148b5161a36c",
|
| @@ -1362,8 +1380,11 @@ TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) {
|
| 50, test::AcmReceiveTestOldApi::kMonoOutput);
|
| }
|
|
|
| -TEST_F(AcmSenderBitExactnessOldApi,
|
| - DISABLED_ON_ANDROID(IF_G722(G722_stereo_20ms))) {
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AcmSenderBitExactnessOldApi, DISABLED_G722_stereo_20ms) {
|
| +#else
|
| +TEST_F(AcmSenderBitExactnessOldApi, G722_stereo_20ms) {
|
| +#endif
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
|
| Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
| "7190ee718ab3d80eca181e5f7140c210",
|
| @@ -1375,6 +1396,7 @@ TEST_F(AcmSenderBitExactnessOldApi,
|
| "android_arm64_payload"),
|
| 50, test::AcmReceiveTestOldApi::kStereoOutput);
|
| }
|
| +#endif
|
|
|
| TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
|
| @@ -1490,7 +1512,11 @@ TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_50kbps) {
|
|
|
| // The result on the Android platforms is inconsistent for this test case.
|
| // On android_rel the result is different from android and android arm64 rel.
|
| -TEST_F(AcmSetBitRateOldApi, DISABLED_ON_ANDROID(Opus_48khz_20ms_100kbps)) {
|
| +#if defined(WEBRTC_ANDROID)
|
| +TEST_F(AcmSetBitRateOldApi, DISABLED_Opus_48khz_20ms_100kbps) {
|
| +#else
|
| +TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_100kbps) {
|
| +#endif
|
| ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
|
| Run(100000, 100888);
|
| }
|
|
|