Add ability to disable detailed error message in RTC_CHECKs

Bug: webrtc:11133
Change-Id: I989654f1fb97b476a17956d69ee374406439ea8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160653
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29952}
This commit is contained in:
Artem Titov
2019-11-28 17:09:30 +01:00
committed by Commit Bot
parent 9750e84d7a
commit 9dc209a23a
21 changed files with 275 additions and 82 deletions

View File

@ -11,7 +11,9 @@
#include "modules/audio_processing/audio_buffer.h"
#include <cmath>
#include "test/gtest.h"
#include "test/testsupport/rtc_expect_death.h"
namespace webrtc {
@ -41,7 +43,7 @@ TEST(AudioBufferTest, SetNumChannelsSetsChannelBuffersNumChannels) {
TEST(AudioBufferTest, SetNumChannelsDeathTest) {
AudioBuffer ab(kSampleRateHz, kMono, kSampleRateHz, kMono, kSampleRateHz,
kMono);
EXPECT_DEATH(ab.set_num_channels(kStereo), "num_channels");
RTC_EXPECT_DEATH(ab.set_num_channels(kStereo), "num_channels");
}
#endif