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

Unified Diff: tests/test_opus_decode.c

Issue 28553003: Updating Opus to a pre-release of 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Removing failing file Created 7 years, 2 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 | « tests/test_opus_api.c ('k') | tests/test_opus_encode.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_opus_decode.c
diff --git a/tests/test_opus_decode.c b/tests/test_opus_decode.c
index e2c04c2ce62b0af9f385427efa5b0659bcc08751..44a0ae524b09ddc2971b3f32b09b95ebe41b1e7e 100644
--- a/tests/test_opus_decode.c
+++ b/tests/test_opus_decode.c
@@ -111,6 +111,10 @@ int test_decoder_code0(int no_fuzz)
if(opus_decoder_ctl(dec[t], OPUS_GET_LAST_PACKET_DURATION(&dur))!=OPUS_OK)test_failed();
if(dur!=120/factor)test_failed();
+ /*Test on a size which isn't a multiple of 2.5ms*/
+ out_samples = opus_decode(dec[t], 0, 0, outbuf, 120/factor+2, fec);
+ if(out_samples!=OPUS_BAD_ARG)test_failed();
+
/*Test null pointer input*/
out_samples = opus_decode(dec[t], 0, -1, outbuf, 120/factor, fec);
if(out_samples!=120/factor)test_failed();
@@ -230,8 +234,8 @@ int test_decoder_code0(int no_fuzz)
/*We only test a subset of the modes here simply because the longer
durations end up taking a long time.*/
static const int cmodes[4]={16,20,24,28};
- static const opus_uint32 cres[4]={116290185,2172123586,2172123586,2172123586};
- static const opus_uint32 lres[3]={3285687739,1481572662,694350475};
+ static const opus_uint32 cres[4]={116290185,2172123586u,2172123586u,2172123586u};
+ static const opus_uint32 lres[3]={3285687739u,1481572662,694350475};
static const int lmodes[3]={0,4,8};
int mode=fast_rand()%4;
« no previous file with comments | « tests/test_opus_api.c ('k') | tests/test_opus_encode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698