Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere

The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
This commit is contained in:
kwiberg
2016-10-04 13:46:56 -07:00
committed by Commit bot
parent cd97b2b943
commit 5377bc77cc
15 changed files with 31 additions and 54 deletions

View File

@ -325,8 +325,8 @@ TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) {
// with clang debug builds.
// TODO(tommi): Re-enable when we've figured out what the problem is.
// http://crbug.com/615050
#if !defined(WEBRTC_WIN) && defined(__clang__) && !defined(NDEBUG)
#if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
#if !defined(WEBRTC_WIN) && defined(__clang__) && RTC_DCHECK_IS_ON && \
GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) {
AudioFrame audio_frame;
bool muted;
@ -334,7 +334,6 @@ TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) {
"dst_sample_rate_hz");
}
#endif
#endif
// Checks that the transport callback is invoked once for each speech packet.
// Also checks that the frame type is kAudioFrameSpeech.