Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: webrtc/modules/audio_coding/test/Tester.cc

Issue 1547343002: Remove DISABLED_ON_ macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: MAYBE_ yo Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
17 #include "webrtc/modules/audio_coding/test/APITest.h" 17 #include "webrtc/modules/audio_coding/test/APITest.h"
18 #include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h" 18 #include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h"
19 #include "webrtc/modules/audio_coding/test/iSACTest.h" 19 #include "webrtc/modules/audio_coding/test/iSACTest.h"
20 #include "webrtc/modules/audio_coding/test/opus_test.h" 20 #include "webrtc/modules/audio_coding/test/opus_test.h"
21 #include "webrtc/modules/audio_coding/test/PacketLossTest.h" 21 #include "webrtc/modules/audio_coding/test/PacketLossTest.h"
22 #include "webrtc/modules/audio_coding/test/TestAllCodecs.h" 22 #include "webrtc/modules/audio_coding/test/TestAllCodecs.h"
23 #include "webrtc/modules/audio_coding/test/TestRedFec.h" 23 #include "webrtc/modules/audio_coding/test/TestRedFec.h"
24 #include "webrtc/modules/audio_coding/test/TestStereo.h" 24 #include "webrtc/modules/audio_coding/test/TestStereo.h"
25 #include "webrtc/modules/audio_coding/test/TestVADDTX.h" 25 #include "webrtc/modules/audio_coding/test/TestVADDTX.h"
26 #include "webrtc/modules/audio_coding/test/TwoWayCommunication.h" 26 #include "webrtc/modules/audio_coding/test/TwoWayCommunication.h"
27 #include "webrtc/system_wrappers/include/trace.h" 27 #include "webrtc/system_wrappers/include/trace.h"
28 #include "webrtc/test/testsupport/fileutils.h" 28 #include "webrtc/test/testsupport/fileutils.h"
29 #include "webrtc/test/testsupport/gtest_disable.h"
30 29
31 using webrtc::Trace; 30 using webrtc::Trace;
32 31
33 // This parameter is used to describe how to run the tests. It is normally 32 // This parameter is used to describe how to run the tests. It is normally
34 // set to 0, and all tests are run in quite mode. 33 // set to 0, and all tests are run in quite mode.
35 #define ACM_TEST_MODE 0 34 #define ACM_TEST_MODE 0
36 35
37 TEST(AudioCodingModuleTest, TestAllCodecs) { 36 TEST(AudioCodingModuleTest, TestAllCodecs) {
38 Trace::CreateTrace(); 37 Trace::CreateTrace();
39 Trace::SetTraceFile((webrtc::test::OutputPath() + 38 Trace::SetTraceFile((webrtc::test::OutputPath() +
40 "acm_allcodecs_trace.txt").c_str()); 39 "acm_allcodecs_trace.txt").c_str());
41 webrtc::TestAllCodecs(ACM_TEST_MODE).Perform(); 40 webrtc::TestAllCodecs(ACM_TEST_MODE).Perform();
42 Trace::ReturnTrace(); 41 Trace::ReturnTrace();
43 } 42 }
44 43
45 TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestEncodeDecode)) { 44 #if defined(WEBRTC_ANDROID)
45 TEST(AudioCodingModuleTest, DISABLED_TestEncodeDecode) {
46 #else
47 TEST(AudioCodingModuleTest, TestEncodeDecode) {
48 #endif
46 Trace::CreateTrace(); 49 Trace::CreateTrace();
47 Trace::SetTraceFile((webrtc::test::OutputPath() + 50 Trace::SetTraceFile((webrtc::test::OutputPath() +
48 "acm_encodedecode_trace.txt").c_str()); 51 "acm_encodedecode_trace.txt").c_str());
49 webrtc::EncodeDecodeTest(ACM_TEST_MODE).Perform(); 52 webrtc::EncodeDecodeTest(ACM_TEST_MODE).Perform();
50 Trace::ReturnTrace(); 53 Trace::ReturnTrace();
51 } 54 }
52 55
53 #ifdef WEBRTC_CODEC_RED 56 #if defined(WEBRTC_CODEC_RED)
54 #define IF_RED(x) x 57 #if defined(WEBRTC_ANDROID)
58 TEST(AudioCodingModuleTest, DISABLED_TestRedFec) {
55 #else 59 #else
56 #define IF_RED(x) DISABLED_##x 60 TEST(AudioCodingModuleTest, TestRedFec) {
57 #endif 61 #endif
58
59 TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(IF_RED(TestRedFec))) {
60 Trace::CreateTrace(); 62 Trace::CreateTrace();
61 Trace::SetTraceFile((webrtc::test::OutputPath() + 63 Trace::SetTraceFile((webrtc::test::OutputPath() +
62 "acm_fec_trace.txt").c_str()); 64 "acm_fec_trace.txt").c_str());
63 webrtc::TestRedFec().Perform(); 65 webrtc::TestRedFec().Perform();
64 Trace::ReturnTrace(); 66 Trace::ReturnTrace();
65 } 67 }
68 #endif
66 69
67 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) 70 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
68 #define IF_ISAC(x) x 71 #if defined(WEBRTC_ANDROID)
72 TEST(AudioCodingModuleTest, DISABLED_TestIsac) {
69 #else 73 #else
70 #define IF_ISAC(x) DISABLED_##x 74 TEST(AudioCodingModuleTest, TestIsac) {
71 #endif 75 #endif
72
73 TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(IF_ISAC(TestIsac))) {
74 Trace::CreateTrace(); 76 Trace::CreateTrace();
75 Trace::SetTraceFile((webrtc::test::OutputPath() + 77 Trace::SetTraceFile((webrtc::test::OutputPath() +
76 "acm_isac_trace.txt").c_str()); 78 "acm_isac_trace.txt").c_str());
77 webrtc::ISACTest(ACM_TEST_MODE).Perform(); 79 webrtc::ISACTest(ACM_TEST_MODE).Perform();
78 Trace::ReturnTrace(); 80 Trace::ReturnTrace();
79 } 81 }
82 #endif
80 83
81 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ 84 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
82 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) 85 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
83 #define IF_ALL_CODECS(x) x 86 #if defined(WEBRTC_ANDROID)
87 TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) {
84 #else 88 #else
85 #define IF_ALL_CODECS(x) DISABLED_##x 89 TEST(AudioCodingModuleTest, TwoWayCommunication) {
86 #endif 90 #endif
87
88 TEST(AudioCodingModuleTest,
89 DISABLED_ON_ANDROID(IF_ALL_CODECS(TwoWayCommunication))) {
90 Trace::CreateTrace(); 91 Trace::CreateTrace();
91 Trace::SetTraceFile((webrtc::test::OutputPath() + 92 Trace::SetTraceFile((webrtc::test::OutputPath() +
92 "acm_twowaycom_trace.txt").c_str()); 93 "acm_twowaycom_trace.txt").c_str());
93 webrtc::TwoWayCommunication(ACM_TEST_MODE).Perform(); 94 webrtc::TwoWayCommunication(ACM_TEST_MODE).Perform();
94 Trace::ReturnTrace(); 95 Trace::ReturnTrace();
95 } 96 }
97 #endif
96 98
97 TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestStereo)) { 99 #if defined(WEBRTC_ANDROID)
100 TEST(AudioCodingModuleTest, DISABLED_TestStereo) {
101 #else
102 TEST(AudioCodingModuleTest, TestStereo) {
103 #endif
98 Trace::CreateTrace(); 104 Trace::CreateTrace();
99 Trace::SetTraceFile((webrtc::test::OutputPath() + 105 Trace::SetTraceFile((webrtc::test::OutputPath() +
100 "acm_stereo_trace.txt").c_str()); 106 "acm_stereo_trace.txt").c_str());
101 webrtc::TestStereo(ACM_TEST_MODE).Perform(); 107 webrtc::TestStereo(ACM_TEST_MODE).Perform();
102 Trace::ReturnTrace(); 108 Trace::ReturnTrace();
103 } 109 }
104 110
105 TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestWebRtcVadDtx)) { 111 #if defined(WEBRTC_ANDROID)
112 TEST(AudioCodingModuleTest, DISABLED_TestWebRtcVadDtx) {
113 #else
114 TEST(AudioCodingModuleTest, TestWebRtcVadDtx) {
115 #endif
106 Trace::CreateTrace(); 116 Trace::CreateTrace();
107 Trace::SetTraceFile((webrtc::test::OutputPath() + 117 Trace::SetTraceFile((webrtc::test::OutputPath() +
108 "acm_vaddtx_trace.txt").c_str()); 118 "acm_vaddtx_trace.txt").c_str());
109 webrtc::TestWebRtcVadDtx().Perform(); 119 webrtc::TestWebRtcVadDtx().Perform();
110 Trace::ReturnTrace(); 120 Trace::ReturnTrace();
111 } 121 }
112 122
113 TEST(AudioCodingModuleTest, TestOpusDtx) { 123 TEST(AudioCodingModuleTest, TestOpusDtx) {
114 Trace::CreateTrace(); 124 Trace::CreateTrace();
115 Trace::SetTraceFile((webrtc::test::OutputPath() + 125 Trace::SetTraceFile((webrtc::test::OutputPath() +
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // for offline testing. User interaction is needed. 172 // for offline testing. User interaction is needed.
163 #ifdef ACM_TEST_FULL_API 173 #ifdef ACM_TEST_FULL_API
164 TEST(AudioCodingModuleTest, TestAPI) { 174 TEST(AudioCodingModuleTest, TestAPI) {
165 Trace::CreateTrace(); 175 Trace::CreateTrace();
166 Trace::SetTraceFile((webrtc::test::OutputPath() + 176 Trace::SetTraceFile((webrtc::test::OutputPath() +
167 "acm_apitest_trace.txt").c_str()); 177 "acm_apitest_trace.txt").c_str());
168 webrtc::APITest().Perform(); 178 webrtc::APITest().Perform();
169 Trace::ReturnTrace(); 179 Trace::ReturnTrace();
170 } 180 }
171 #endif 181 #endif
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_unittest.cc ('k') | webrtc/modules/audio_coding/test/target_delay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698