From e102e8147ba5a4b9b028f9fb506b0f91d04c6826 Mon Sep 17 00:00:00 2001 From: "kwiberg@webrtc.org" Date: Wed, 17 Dec 2014 07:30:23 +0000 Subject: [PATCH] Enable the iSACfix AudioDecoder test (and make it work again) As far as I can tell, the test should have been enabled again once https://code.google.com/p/webrtc/issues/detail?id=1353 was fixed, but it wasn't, and has rotted a bit as a result. I'm not sure why the number of encoded bytes have changed, but the output seems to be correct (EncodeDecodeTest encodes, decodes, and compares the result with the original). The DecodePlc change is necessary because r7912 added support for that to the iSACfix AudioDecoder. BUG=1353, 3926 R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/28309004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7927 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/neteq/audio_decoder_unittest.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc index 927c30b51c..2aed0fbd2b 100644 --- a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc @@ -528,14 +528,20 @@ TEST_F(AudioDecoderIsacSwbTest, EncodeDecode) { DecodePlcTest(); } -TEST_F(AudioDecoderIsacFixTest, DISABLED_EncodeDecode) { +TEST_F(AudioDecoderIsacFixTest, EncodeDecode) { int tolerance = 11034; double mse = 3.46e6; int delay = 54; // Delay from input to output. EXPECT_TRUE(CodecSupported(kDecoderISAC)); - EncodeDecodeTest(735, tolerance, mse, delay); +#ifdef WEBRTC_ANDROID + static const int kEncodedBytes = 685; +#else + static const int kEncodedBytes = 671; +#endif + EncodeDecodeTest(kEncodedBytes, tolerance, mse, delay); ReInitTest(); - EXPECT_FALSE(decoder_->HasDecodePlc()); + EXPECT_TRUE(decoder_->HasDecodePlc()); + DecodePlcTest(); } TEST_F(AudioDecoderG722Test, EncodeDecode) {