aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
diff options
context:
space:
mode:
authorPeter Boström <pbos@webrtc.org>2016-01-04 22:44:05 +0100
committerPeter Boström <pbos@webrtc.org>2016-01-04 21:44:16 +0000
commite2976c87f7ba627fa1e1246f0ccfb34b4b9f3a73 (patch)
tree99bff7f5d17b8fd2a0cb0e06ee8b8e1d27442cf3 /webrtc/modules/audio_coding/neteq/neteq_unittest.cc
parent13f61dfea59a546e4e0081eb79e38c542ec51cf6 (diff)
downloadwebrtc-e2976c87f7ba627fa1e1246f0ccfb34b4b9f3a73.tar.gz
Remove DISABLED_ON_ macros.
Macro incorrectly displays DISABLED_ON_ANDROID in test names for parameterized tests under --gtest_list_tests, causing tests to be disabled on all platforms since they contain the DISABLED_ prefix rather than their expanded variants. This expands the macro variants to inline if they're disabled or not, and removes building some tests under configurations where they should fail, instead of building them but disabling them by default. The change also removes gtest_disable.h as an unused include from many other files. BUG=webrtc:5387, webrtc:5400 R=kjellander@webrtc.org, phoglund@webrtc.org TBR=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1547343002 . Cr-Commit-Position: refs/heads/master@{#11150}
Diffstat (limited to 'webrtc/modules/audio_coding/neteq/neteq_unittest.cc')
-rw-r--r--webrtc/modules/audio_coding/neteq/neteq_unittest.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
index b3d6d8c7a7..a6b9388f6c 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
@@ -30,7 +30,6 @@
#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
#include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h"
#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/test/testsupport/gtest_disable.h"
#include "webrtc/typedefs.h"
#ifdef WEBRTC_NETEQ_UNITTEST_BITEXACT
@@ -930,13 +929,13 @@ TEST_F(NetEqDecodingTest, UnknownPayloadType) {
EXPECT_EQ(NetEq::kUnknownRtpPayloadType, neteq_->LastError());
}
-#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
-#define IF_ISAC(x) x
+#if defined(WEBRTC_ANDROID)
+#define MAYBE_DecoderError DISABLED_DecoderError
#else
-#define IF_ISAC(x) DISABLED_##x
+#define MAYBE_DecoderError DecoderError
#endif
-
-TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(IF_ISAC(DecoderError))) {
+#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
+TEST_F(NetEqDecodingTest, MAYBE_DecoderError) {
const size_t kPayloadBytes = 100;
uint8_t payload[kPayloadBytes] = {0};
WebRtcRTPHeader rtp_info;
@@ -974,6 +973,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(IF_ISAC(DecoderError))) {
EXPECT_EQ(1, out_data_[i]);
}
}
+#endif
TEST_F(NetEqDecodingTest, GetAudioBeforeInsertPacket) {
NetEqOutputType type;
@@ -1171,7 +1171,8 @@ TEST_F(NetEqBgnTestFade, RunTest) {
CheckBgn(32000);
}
-TEST_F(NetEqDecodingTest, IF_ISAC(SyncPacketInsert)) {
+#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
+TEST_F(NetEqDecodingTest, SyncPacketInsert) {
WebRtcRTPHeader rtp_info;
uint32_t receive_timestamp = 0;
// For the readability use the following payloads instead of the defaults of
@@ -1250,6 +1251,7 @@ TEST_F(NetEqDecodingTest, IF_ISAC(SyncPacketInsert)) {
--rtp_info.header.ssrc;
EXPECT_EQ(0, neteq_->InsertSyncPacket(rtp_info, receive_timestamp));
}
+#endif
// First insert several noise like packets, then sync-packets. Decoding all
// packets should not produce error, statistics should not show any packet loss