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

Unified Diff: webrtc/modules/audio_processing/audio_processing_unittest.cc

Issue 2320053003: webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_unittest.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_unittest.cc b/webrtc/modules/audio_processing/audio_processing_unittest.cc
index 23705e793d53858209e7fe085051ee057ec5cbd3..646e8b7b874eb1c0baba34c12cb926503d3a5d1a 100644
--- a/webrtc/modules/audio_processing/audio_processing_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_unittest.cc
@@ -17,6 +17,7 @@
#include <queue>
#include "webrtc/base/arraysize.h"
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/include/audio_util.h"
#include "webrtc/common_audio/resampler/include/push_resampler.h"
#include "webrtc/common_audio/resampler/push_sinc_resampler.h"
@@ -92,7 +93,7 @@ size_t TotalChannelsFromLayout(AudioProcessing::ChannelLayout layout) {
case AudioProcessing::kStereoAndKeyboard:
return 3;
}
- assert(false);
+ RTC_NOTREACHED();
return 0;
}
@@ -265,7 +266,7 @@ std::string OutputFilePath(std::string name,
} else if (num_output_channels == 2) {
ss << "stereo";
} else {
- assert(false);
+ RTC_NOTREACHED();
}
ss << output_rate / 1000;
if (num_reverse_output_channels == 1) {
@@ -273,7 +274,7 @@ std::string OutputFilePath(std::string name,
} else if (num_reverse_output_channels == 2) {
ss << "_rstereo";
} else {
- assert(false);
+ RTC_NOTREACHED();
}
ss << reverse_output_rate / 1000;
ss << "_d" << file_direction << "_pcm";
@@ -311,7 +312,7 @@ bool ReadChunk(FILE* file, int16_t* int_data, float* float_data,
size_t read_count = fread(int_data, sizeof(int16_t), frame_size, file);
if (read_count != frame_size) {
// Check that the file really ended.
- assert(feof(file));
+ RTC_DCHECK(feof(file));
return false; // This is expected.
}
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698