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

Unified Diff: webrtc/api/test/fakeaudiocapturemodule.cc

Issue 2622413005: Replace use of ASSERT in test code. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/test/fakeaudiocapturemodule.cc
diff --git a/webrtc/api/test/fakeaudiocapturemodule.cc b/webrtc/api/test/fakeaudiocapturemodule.cc
index f118967cdb0bdeeba5382ea81a59b717313cbbde..c0b761fd3dd64f87d60ec977fbb181379d038abe 100644
--- a/webrtc/api/test/fakeaudiocapturemodule.cc
+++ b/webrtc/api/test/fakeaudiocapturemodule.cc
@@ -639,7 +639,7 @@ void FakeAudioCaptureModule::UpdateProcessing(bool start) {
}
void FakeAudioCaptureModule::StartProcessP() {
- ASSERT(process_thread_->IsCurrent());
+ RTC_CHECK(process_thread_->IsCurrent());
kwiberg-webrtc 2017/01/17 09:39:25 CHECK may be the correct choice here, if it is the
nisse-webrtc 2017/01/17 12:19:21 I don't quite like depending on gtest here. I don'
kwiberg-webrtc 2017/01/17 13:52:47 Hmm. OK, CHECK is probably fine. (Since this is te
if (started_) {
// Already started.
return;
@@ -648,7 +648,7 @@ void FakeAudioCaptureModule::StartProcessP() {
}
void FakeAudioCaptureModule::ProcessFrameP() {
- ASSERT(process_thread_->IsCurrent());
+ RTC_CHECK(process_thread_->IsCurrent());
if (!started_) {
next_frame_time_ = rtc::TimeMillis();
started_ = true;
@@ -673,7 +673,7 @@ void FakeAudioCaptureModule::ProcessFrameP() {
}
void FakeAudioCaptureModule::ReceiveFrameP() {
- ASSERT(process_thread_->IsCurrent());
+ RTC_CHECK(process_thread_->IsCurrent());
{
rtc::CritScope cs(&crit_callback_);
if (!audio_callback_) {
@@ -689,7 +689,7 @@ void FakeAudioCaptureModule::ReceiveFrameP() {
&elapsed_time_ms, &ntp_time_ms) != 0) {
RTC_NOTREACHED();
}
- ASSERT(nSamplesOut == kNumberSamples);
+ RTC_CHECK(nSamplesOut == kNumberSamples);
}
// The SetBuffer() function ensures that after decoding, the audio buffer
// should contain samples of similar magnitude (there is likely to be some
@@ -704,7 +704,7 @@ void FakeAudioCaptureModule::ReceiveFrameP() {
}
void FakeAudioCaptureModule::SendFrameP() {
- ASSERT(process_thread_->IsCurrent());
+ RTC_CHECK(process_thread_->IsCurrent());
rtc::CritScope cs(&crit_callback_);
if (!audio_callback_) {
return;

Powered by Google App Engine
This is Rietveld 408576698