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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix MSVC warning Created 5 years, 6 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/modules/audio_coding/codecs/opus/opus_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
index 9289933c04ad88fec98a15deac3afb97b15dc6de..2a88772a864464fcf103fbe4cc1c9e77b9c5b39e 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -105,6 +105,7 @@ int OpusTest::EncodeDecode(WebRtcOpusEncInst* encoder,
input_audio,
input_samples, kMaxBytes,
bitstream_);
+ EXPECT_GE(encoded_bytes_, 0);
return WebRtcOpus_Decode(decoder, bitstream_,
encoded_bytes_, output_audio,
audio_type);
@@ -538,6 +539,7 @@ TEST_P(OpusTest, OpusDurationEstimation) {
speech_data_.GetNextBlock(),
kOpus10msFrameSamples, kMaxBytes,
bitstream_);
+ EXPECT_GE(encoded_bytes_, 0);
EXPECT_EQ(kOpus10msFrameSamples,
WebRtcOpus_DurationEst(opus_decoder_, bitstream_,
encoded_bytes_));
@@ -547,6 +549,7 @@ TEST_P(OpusTest, OpusDurationEstimation) {
speech_data_.GetNextBlock(),
kOpus20msFrameSamples, kMaxBytes,
bitstream_);
+ EXPECT_GE(encoded_bytes_, 0);
EXPECT_EQ(kOpus20msFrameSamples,
WebRtcOpus_DurationEst(opus_decoder_, bitstream_,
encoded_bytes_));

Powered by Google App Engine
This is Rietveld 408576698