• Home
  • Raw
  • Download

Lines Matching refs:test_failed

105       if(((c==1||c==2)&&(i<=2048||i>1<<16))||((c!=1&&c!=2)&&i!=0))test_failed();  in test_dec_api()
127 if(err!=OPUS_BAD_ARG || dec!=NULL)test_failed(); in test_dec_api()
130 if(dec!=NULL)test_failed(); in test_dec_api()
133 if(dec==NULL)test_failed(); in test_dec_api()
135 if(err!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
143 if(err!=OPUS_OK || dec==NULL)test_failed(); in test_dec_api()
151 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
154 if(err!=OPUS_OK)test_failed(); in test_dec_api()
160 if(err!=OPUS_UNIMPLEMENTED)test_failed(); in test_dec_api()
165 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
168 if(err != OPUS_OK || i!=0)test_failed(); in test_dec_api()
173 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
176 if(err != OPUS_OK || i!=48000)test_failed(); in test_dec_api()
182 if(err!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
186 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
190 if(opus_decode(dec, packet, 3, sbuf, 960, 0)!=960)test_failed(); in test_dec_api()
194 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
197 if(opus_decode(dec, packet, 1, sbuf, 960, 0)!=960)test_failed(); in test_dec_api()
201 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
206 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
209 if(err != OPUS_OK || i!=960)test_failed(); in test_dec_api()
216 if(err != OPUS_OK || i!=0)test_failed(); in test_dec_api()
219 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
222 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
225 if(err != OPUS_BAD_ARG)test_failed(); in test_dec_api()
228 if(err != OPUS_OK)test_failed(); in test_dec_api()
233 if(err != OPUS_OK || i!=-15)test_failed(); in test_dec_api()
241 if(opus_decoder_ctl(dec, OPUS_RESET_STATE)!=OPUS_OK)test_failed(); in test_dec_api()
242 if(memcmp(dec2,dec,opus_decoder_get_size(2))==0)test_failed(); in test_dec_api()
249 if(opus_decoder_get_nb_samples(dec,packet,1)!=480)test_failed(); in test_dec_api()
250 if(opus_packet_get_nb_samples(packet,1,48000)!=480)test_failed(); in test_dec_api()
251 if(opus_packet_get_nb_samples(packet,1,96000)!=960)test_failed(); in test_dec_api()
252 if(opus_packet_get_nb_samples(packet,1,32000)!=320)test_failed(); in test_dec_api()
253 if(opus_packet_get_nb_samples(packet,1,8000)!=80)test_failed(); in test_dec_api()
255 if(opus_packet_get_nb_samples(packet,1,24000)!=OPUS_INVALID_PACKET)test_failed(); in test_dec_api()
258 if(opus_packet_get_nb_samples(packet,0,24000)!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
259 if(opus_packet_get_nb_samples(packet,2,48000)!=OPUS_INVALID_PACKET)test_failed(); in test_dec_api()
260 if(opus_decoder_get_nb_samples(dec,packet,2)!=OPUS_INVALID_PACKET)test_failed(); in test_dec_api()
264 if(OPUS_BAD_ARG!=opus_packet_get_nb_frames(packet,0))test_failed(); in test_dec_api()
268 if(l1res[packet[0]&3]!=opus_packet_get_nb_frames(packet,1))test_failed(); in test_dec_api()
272 …acket[0]&3)!=3?l1res[packet[0]&3]:packet[1]&63)!=opus_packet_get_nb_frames(packet,2))test_failed(); in test_dec_api()
283 if(bw!=opus_packet_get_bandwidth(packet))test_failed(); in test_dec_api()
294 …opus_rates[rate]*3/fp3s)!=opus_packet_get_samples_per_frame(packet,opus_rates[rate]))test_failed(); in test_dec_api()
304 if(opus_decode(dec, packet, 51, sbuf, 960, 0)!=OPUS_INVALID_PACKET)test_failed(); in test_dec_api()
308 if(opus_decode(dec, packet, -1, sbuf, 960, 0)!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
310 if(opus_decode(dec, packet, 3, sbuf, 60, 0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_dec_api()
312 if(opus_decode(dec, packet, 3, sbuf, 480, 0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_dec_api()
314 if(opus_decode(dec, packet, 3, sbuf, 960, 0)!=960)test_failed(); in test_dec_api()
319 if(opus_decode_float(dec, packet, 3, fbuf, 960, 0)!=960)test_failed(); in test_dec_api()
326 if(opus_decoder_ctl(0,OPUS_RESET_STATE) !=OPUS_INVALID_STATE)test_failed(); in test_dec_api()
327 if(opus_decoder_init(0,48000,1) !=OPUS_INVALID_STATE)test_failed(); in test_dec_api()
328 if(opus_decode(0,packet,1,outbuf,2880,0) !=OPUS_INVALID_STATE)test_failed(); in test_dec_api()
329 if(opus_decode_float(0,packet,1,0,2880,0) !=OPUS_INVALID_STATE)test_failed(); in test_dec_api()
330 if(opus_decoder_get_nb_samples(0,packet,1) !=OPUS_INVALID_STATE)test_failed(); in test_dec_api()
331 if(opus_packet_get_nb_frames(NULL,1) !=OPUS_BAD_ARG)test_failed(); in test_dec_api()
332 if(opus_packet_get_bandwidth(NULL) !=OPUS_BAD_ARG)test_failed(); in test_dec_api()
333 if(opus_packet_get_samples_per_frame(NULL,48000)!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
374 if(((a>0&&b<=a&&b>=0)&&(i<=2048||i>((1<<16)*a)))||((a<1||b>a||b<0)&&i!=0))test_failed(); in test_msdec_api()
397 if(err!=OPUS_BAD_ARG || dec!=NULL)test_failed(); in test_msdec_api()
400 if(dec!=NULL)test_failed(); in test_msdec_api()
403 if(dec==NULL)test_failed(); in test_msdec_api()
405 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
423 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
430 if((ret_err && *ret_err!=OPUS_OK) || dec==NULL)test_failed(); in test_msdec_api()
438 if((ret_err && *ret_err!=OPUS_OK) || dec==NULL)test_failed(); in test_msdec_api()
442 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
446 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
455 if((ret_err && *ret_err!=OPUS_OK) || dec==NULL)test_failed(); in test_msdec_api()
463 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
469 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
475 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
481 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
487 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
493 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
499 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
508 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
517 if((ret_err && *ret_err!=OPUS_OK) || dec==NULL)test_failed(); in test_msdec_api()
530 if((ret_err && *ret_err!=OPUS_BAD_ARG) || dec!=NULL)test_failed(); in test_msdec_api()
541 if(err!=OPUS_OK || dec==NULL)test_failed(); in test_msdec_api()
549 if(err!=OPUS_OK)test_failed(); in test_msdec_api()
557 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
560 if(err!=OPUS_OK||streamdec==NULL)test_failed(); in test_msdec_api()
564 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
567 if(err!=OPUS_OK||streamdec==NULL)test_failed(); in test_msdec_api()
576 if(err != OPUS_OK)test_failed(); in test_msdec_api()
580 if(err != OPUS_OK || i!=0)test_failed(); in test_msdec_api()
584 if(err!=OPUS_OK)test_failed(); in test_msdec_api()
590 if(err != OPUS_OK)test_failed(); in test_msdec_api()
594 if(err != OPUS_OK || i!=15)test_failed(); in test_msdec_api()
601 if(err != OPUS_OK || i!=0)test_failed(); in test_msdec_api()
606 if(err!=OPUS_UNIMPLEMENTED)test_failed(); in test_msdec_api()
614 if(err!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
618 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
622 if(opus_multistream_decode(dec, packet, 3, sbuf, 960, 0)!=960)test_failed(); in test_msdec_api()
626 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
629 if(opus_multistream_decode(dec, packet, 1, sbuf, 960, 0)!=960)test_failed(); in test_msdec_api()
633 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
639 if(opus_multistream_decoder_ctl(dec, OPUS_RESET_STATE)!=OPUS_OK)test_failed(); in test_msdec_api()
647 if(err!=OPUS_OK || dec==NULL)test_failed(); in test_msdec_api()
654 if(opus_multistream_decode(dec, packet, 51, sbuf, 960, 0)!=OPUS_INVALID_PACKET)test_failed(); in test_msdec_api()
658 …OPUS_BAD_ARG){printf("%d\n",opus_multistream_decode(dec, packet, -1, sbuf, 960, 0));test_failed();} in test_msdec_api()
660 if(opus_multistream_decode(dec, packet, 3, sbuf, 60, 0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_msdec_api()
662 if(opus_multistream_decode(dec, packet, 3, sbuf, 480, 0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_msdec_api()
664 if(opus_multistream_decode(dec, packet, 3, sbuf, 960, 0)!=960)test_failed(); in test_msdec_api()
669 if(opus_multistream_decode_float(dec, packet, 3, fbuf, 960, 0)!=960)test_failed(); in test_msdec_api()
676 if(opus_multistream_decoder_ctl(0,OPUS_RESET_STATE) !=OPUS_INVALID_STATE)test_failed(); in test_msdec_api()
677 if(opus_multistream_decoder_init(0,48000,1) !=OPUS_INVALID_STATE)test_failed(); in test_msdec_api()
678 if(opus_multistream_decode(0,packet,1,outbuf,2880,0) !=OPUS_INVALID_STATE)test_failed(); in test_msdec_api()
679 if(opus_multistream_decode_float(0,packet,1,0,2880,0) !=OPUS_INVALID_STATE)test_failed(); in test_msdec_api()
680 if(opus_multistream_decoder_get_nb_samples(0,packet,1) !=OPUS_INVALID_STATE)test_failed(); in test_msdec_api()
722 if(opus_packet_parse(packet,1,&toc,frames,0,&payload_offset)!=OPUS_BAD_ARG)test_failed(); in test_parse()
731 if(ret!=1)test_failed(); in test_parse()
732 if(size[0]!=3)test_failed(); in test_parse()
733 if(frames[0]!=packet+1)test_failed(); in test_parse()
751 if(ret!=2)test_failed(); in test_parse()
752 if(size[0]!=size[1] || size[0]!=((jj-1)>>1))test_failed(); in test_parse()
753 if(frames[0]!=packet+1)test_failed(); in test_parse()
754 if(frames[1]!=frames[0]+size[0])test_failed(); in test_parse()
755 if((toc>>2)!=i)test_failed(); in test_parse()
756 } else if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
769 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
774 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
783 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
788 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
793 if(ret!=2)test_failed(); in test_parse()
794 if(size[0]!=j||size[1]!=0)test_failed(); in test_parse()
795 if(frames[1]!=frames[0]+size[0])test_failed(); in test_parse()
796 if((toc>>2)!=i)test_failed(); in test_parse()
801 if(ret!=2)test_failed(); in test_parse()
802 if(size[0]!=j||size[1]!=(j<<1)+3-j-(j<252?1:2))test_failed(); in test_parse()
803 if(frames[1]!=frames[0]+size[0])test_failed(); in test_parse()
804 if((toc>>2)!=i)test_failed(); in test_parse()
817 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
832 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
837 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
842 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
847 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
863 if(ret!=1)test_failed(); in test_parse()
864 if(size[0]!=j)test_failed(); in test_parse()
865 if((toc>>2)!=i)test_failed(); in test_parse()
870 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
892 if(ret!=j)test_failed(); in test_parse()
893 for(jj=1;jj<ret;jj++)if(frames[jj]!=frames[jj-1]+size[jj-1])test_failed(); in test_parse()
894 if((toc>>2)!=i)test_failed(); in test_parse()
895 } else if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
903 if(ret!=packet[1])test_failed(); in test_parse()
904 for(jj=0;jj<ret;jj++)if(size[jj]!=1275)test_failed(); in test_parse()
921 if(ret!=1)test_failed(); in test_parse()
922 if(size[0]!=jj)test_failed(); in test_parse()
923 if((toc>>2)!=i)test_failed(); in test_parse()
928 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
936 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
943 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
949 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
957 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
964 if(ret!=j)test_failed(); in test_parse()
965 for(jj=0;jj<j;jj++)if(size[jj]!=0)test_failed(); in test_parse()
966 if((toc>>2)!=i)test_failed(); in test_parse()
967 } else if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
983 if(ret!=j)test_failed(); in test_parse()
984 for(jj=0;jj<j-1;jj++)if(size[jj]!=as)test_failed(); in test_parse()
985 if(size[j-1]!=(tsz[sz]+i-2-pos-as*(j-1)))test_failed(); in test_parse()
986 if((toc>>2)!=i)test_failed(); in test_parse()
987 } else if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
1004 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
1021 if(ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
1028 if(ret!=1)test_failed(); in test_parse()
1029 if(size[0]!=tsz[sz]+i)test_failed(); in test_parse()
1030 if((toc>>2)!=i)test_failed(); in test_parse()
1031 } else if (ret!=OPUS_INVALID_PACKET)test_failed(); in test_parse()
1048 if(opus_encoder_ctl(enc,setcall)==OPUS_OK)test_failed();\
1050 if(opus_encoder_ctl(enc,setcall)==OPUS_OK)test_failed();\
1052 if(opus_encoder_ctl(enc,setcall)!=OPUS_OK)test_failed();\
1056 if(err!=OPUS_OK || i!=j)test_failed();\
1058 if(opus_encoder_ctl(enc,setcall)!=OPUS_OK)test_failed();\
1063 if(err!=OPUS_OK || i!=j)test_failed();\
1086 if(((c==1||c==2)&&(i<=2048||i>1<<17))||((c!=1&&c!=2)&&i!=0))test_failed(); in test_enc_api()
1108 if(err!=OPUS_BAD_ARG || enc!=NULL)test_failed(); in test_enc_api()
1111 if(enc!=NULL)test_failed(); in test_enc_api()
1115 if(enc==NULL)test_failed(); in test_enc_api()
1117 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1124 if(enc!=NULL)test_failed(); in test_enc_api()
1129 if(err!=OPUS_BAD_ARG || enc!=NULL)test_failed(); in test_enc_api()
1134 if(enc==NULL)test_failed(); in test_enc_api()
1140 if(err!=OPUS_OK || enc==NULL)test_failed(); in test_enc_api()
1143 if(err!=OPUS_OK || i<0 || i>32766)test_failed(); in test_enc_api()
1149 if(err!=OPUS_OK || enc==NULL)test_failed(); in test_enc_api()
1152 if(err!=OPUS_OK || i<0 || i>32766)test_failed(); in test_enc_api()
1158 if(err!=OPUS_OK || enc==NULL)test_failed(); in test_enc_api()
1167 if(err!=OPUS_OK || i<0 || i>32766)test_failed(); in test_enc_api()
1170 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1175 if(err!=OPUS_OK || i!=48000)test_failed(); in test_enc_api()
1178 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1182 if(opus_encoder_ctl(enc,OPUS_UNIMPLEMENTED)!=OPUS_UNIMPLEMENTED)test_failed(); in test_enc_api()
1187 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1195 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1197 if(opus_encoder_ctl(enc,OPUS_SET_BITRATE(1073741832))!=OPUS_OK)test_failed(); in test_enc_api()
1200 if(opus_encoder_ctl(enc,OPUS_GET_BITRATE(&i))!=OPUS_OK)test_failed(); in test_enc_api()
1201 if(i>700000||i<256000)test_failed(); in test_enc_api()
1209 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1217 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))==OPUS_OK)test_failed(); in test_enc_api()
1220 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))==OPUS_OK)test_failed(); in test_enc_api()
1223 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1226 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1229 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1232 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1242 i!=OPUS_BANDWIDTH_FULLBAND&&i!=OPUS_AUTO))test_failed(); in test_enc_api()
1244 if(opus_encoder_ctl(enc,OPUS_SET_BANDWIDTH(OPUS_AUTO))!=OPUS_OK)test_failed(); in test_enc_api()
1247 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1252 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))==OPUS_OK)test_failed(); in test_enc_api()
1255 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))==OPUS_OK)test_failed(); in test_enc_api()
1258 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1261 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1264 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1267 if(opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(i))!=OPUS_OK)test_failed(); in test_enc_api()
1277 i!=OPUS_BANDWIDTH_FULLBAND))test_failed(); in test_enc_api()
1280 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1285 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1293 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1301 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1309 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1317 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1333 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1341 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1349 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1356 if(i!=0)test_failed(); in test_enc_api()
1359 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1366 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1369 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1372 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1375 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1378 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1381 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1384 if(err!=OPUS_OK)test_failed(); in test_enc_api()
1394 if(err!=OPUS_BAD_ARG)test_failed(); in test_enc_api()
1396 if(opus_encoder_ctl(enc,OPUS_GET_FINAL_RANGE(&enc_final_range))!=OPUS_OK)test_failed(); in test_enc_api()
1401 if(opus_encoder_ctl(enc, OPUS_RESET_STATE)!=OPUS_OK)test_failed(); in test_enc_api()
1408 if(i<1 || (i>(opus_int32)sizeof(packet)))test_failed(); in test_enc_api()
1416 if(i<1 || (i>(opus_int32)sizeof(packet)))test_failed(); in test_enc_api()
1424 if(opus_encoder_ctl(0,OPUS_RESET_STATE) !=OPUS_INVALID_STATE)test_failed(); in test_enc_api()
1425 if(opus_encoder_init(0,48000,1,OPUS_APPLICATION_VOIP) !=OPUS_INVALID_STATE)test_failed(); in test_enc_api()
1426 if(opus_encode(0,sbuf,960,packet,sizeof(packet)) !=OPUS_INVALID_STATE)test_failed(); in test_enc_api()
1427 if(opus_encode_float(0,fbuf,960,packet,sizeof(packet))!=OPUS_INVALID_STATE)test_failed(); in test_enc_api()
1448 if(packet==NULL)test_failed(); in test_repacketizer_api()
1451 if(po==NULL)test_failed(); in test_repacketizer_api()
1454 if(i<=0)test_failed(); in test_repacketizer_api()
1460 if(rp==NULL)test_failed(); in test_repacketizer_api()
1466 if(rp==NULL)test_failed(); in test_repacketizer_api()
1470 if(opus_repacketizer_get_nb_frames(rp)!=0)test_failed(); in test_repacketizer_api()
1476 if(opus_repacketizer_cat(rp,packet,0)!=OPUS_INVALID_PACKET)test_failed(); /* Zero len */ in test_repacketizer_api()
1479 … if(opus_repacketizer_cat(rp,packet,2)!=OPUS_INVALID_PACKET)test_failed(); /* Odd payload code 1 */ in test_repacketizer_api()
1482 …if(opus_repacketizer_cat(rp,packet,1)!=OPUS_INVALID_PACKET)test_failed(); /* Code 2 overflow one */ in test_repacketizer_api()
1485 if(opus_repacketizer_cat(rp,packet,1)!=OPUS_INVALID_PACKET)test_failed(); /* Code 3 no count */ in test_repacketizer_api()
1489 …if(opus_repacketizer_cat(rp,packet,2)!=OPUS_INVALID_PACKET)test_failed(); /* Code 2 overflow two */ in test_repacketizer_api()
1493 …if(opus_repacketizer_cat(rp,packet,251)!=OPUS_INVALID_PACKET)test_failed(); /* Code 2 overflow thr… in test_repacketizer_api()
1497 if(opus_repacketizer_cat(rp,packet,2)!=OPUS_INVALID_PACKET)test_failed(); /* Code 3 m=0 */ in test_repacketizer_api()
1500 if(opus_repacketizer_cat(rp,packet,100)!=OPUS_INVALID_PACKET)test_failed(); /* Code 3 m=49 */ in test_repacketizer_api()
1503 if(opus_repacketizer_cat(rp,packet,3)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1506 if(opus_repacketizer_cat(rp,packet,3)!=OPUS_INVALID_PACKET)test_failed(); /* Change in TOC */ in test_repacketizer_api()
1535 if((cnt<=maxp&&k<=(1275*i))?ret!=OPUS_OK:ret!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1539 if(opus_repacketizer_get_nb_frames(rp)!=rcnt*i)test_failed(); in test_repacketizer_api()
1546 if(ret!=len)test_failed(); in test_repacketizer_api()
1547 if((rcnt*i)<2&&(po[0]&3)!=0)test_failed(); /* Code 0 */ in test_repacketizer_api()
1548 if((rcnt*i)==2&&(po[0]&3)!=1)test_failed(); /* Code 1 */ in test_repacketizer_api()
1549 if((rcnt*i)>2&&(((po[0]&3)!=3)||(po[1]!=rcnt*i)))test_failed(); /* Code 3 CBR */ in test_repacketizer_api()
1551 if(opus_repacketizer_out(rp,po,len)!=len)test_failed(); in test_repacketizer_api()
1553 if(opus_packet_unpad(po,len)!=len)test_failed(); in test_repacketizer_api()
1555 if(opus_packet_pad(po,len,len+1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1557 if(opus_packet_pad(po,len+1,len+256)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1559 if(opus_packet_unpad(po,len+256)!=len)test_failed(); in test_repacketizer_api()
1561 if(opus_multistream_packet_unpad(po,len,1)!=len)test_failed(); in test_repacketizer_api()
1563 if(opus_multistream_packet_pad(po,len,len+1,1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1565 if(opus_multistream_packet_pad(po,len+1,len+256,1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1567 if(opus_multistream_packet_unpad(po,len+256,1)!=len)test_failed(); in test_repacketizer_api()
1569 if(opus_repacketizer_out(rp,po,len-1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1573 if(opus_repacketizer_out(rp,po,1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1576 if(opus_repacketizer_out(rp,po,0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1578 … } else if (ret!=OPUS_BAD_ARG)test_failed(); /* M must not be 0 */ in test_repacketizer_api()
1588 if(opus_repacketizer_cat(rp,packet,5)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1591 if(opus_repacketizer_cat(rp,packet,9)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1594 if((i!=(4+8+2))||((po[0]&3)!=3)||((po[1]&63)!=3)||((po[1]>>7)!=0))test_failed(); in test_repacketizer_api()
1597 if(i!=5||(po[0]&3)!=0)test_failed(); in test_repacketizer_api()
1600 if(i!=5||(po[0]&3)!=0)test_failed(); in test_repacketizer_api()
1606 if(opus_repacketizer_cat(rp,packet,9)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1609 if(opus_repacketizer_cat(rp,packet,3)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1612 if((i!=(2+8+2+2))||((po[0]&3)!=3)||((po[1]&63)!=3)||((po[1]>>7)!=1))test_failed(); in test_repacketizer_api()
1619 if(opus_repacketizer_cat(rp,packet,8)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1621 if(opus_repacketizer_cat(rp,packet,8)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1624 if((i!=(2+1+1+1+4+2+4+2))||((po[0]&3)!=3)||((po[1]&63)!=4)||((po[1]>>7)!=1))test_failed(); in test_repacketizer_api()
1631 if(opus_repacketizer_cat(rp,packet,10)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1633 if(opus_repacketizer_cat(rp,packet,10)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1636 if((i!=(2+4+4+4+4))||((po[0]&3)!=3)||((po[1]&63)!=4)||((po[1]>>7)!=0))test_failed(); in test_repacketizer_api()
1655 if(ret!=OPUS_OK)test_failed(); in test_repacketizer_api()
1658 } else if (ret!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1661 if(opus_repacketizer_out(rp,po,max_out)!=len)test_failed(); in test_repacketizer_api()
1662 if(rcnt>2&&(po[1]&63)!=rcnt)test_failed(); in test_repacketizer_api()
1663 if(rcnt==2&&(po[0]&3)!=2)test_failed(); in test_repacketizer_api()
1664 if(rcnt==1&&(po[0]&3)!=0)test_failed(); in test_repacketizer_api()
1666 if(opus_repacketizer_out(rp,po,len)!=len)test_failed(); in test_repacketizer_api()
1668 if(opus_packet_unpad(po,len)!=len)test_failed(); in test_repacketizer_api()
1670 if(opus_packet_pad(po,len,len+1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1672 if(opus_packet_pad(po,len+1,len+256)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1674 if(opus_packet_unpad(po,len+256)!=len)test_failed(); in test_repacketizer_api()
1676 if(opus_multistream_packet_unpad(po,len,1)!=len)test_failed(); in test_repacketizer_api()
1678 if(opus_multistream_packet_pad(po,len,len+1,1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1680 if(opus_multistream_packet_pad(po,len+1,len+256,1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1682 if(opus_multistream_packet_unpad(po,len+256,1)!=len)test_failed(); in test_repacketizer_api()
1684 if(opus_repacketizer_out(rp,po,len-1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1688 if(opus_repacketizer_out(rp,po,1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1691 if(opus_repacketizer_out(rp,po,0)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1698 if(opus_packet_pad(po,4,4)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1700 if(opus_multistream_packet_pad(po,4,4,1)!=OPUS_OK)test_failed(); in test_repacketizer_api()
1702 if(opus_packet_pad(po,4,5)!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1704 if(opus_multistream_packet_pad(po,4,5,1)!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1706 if(opus_packet_pad(po,0,5)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1708 if(opus_multistream_packet_pad(po,0,5,1)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1710 if(opus_packet_unpad(po,0)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1712 if(opus_multistream_packet_unpad(po,0,1)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1714 if(opus_packet_unpad(po,4)!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1716 if(opus_multistream_packet_unpad(po,4,1)!=OPUS_INVALID_PACKET)test_failed(); in test_repacketizer_api()
1721 if(opus_packet_pad(po,5,4)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1723 if(opus_multistream_packet_pad(po,5,4,1)!=OPUS_BAD_ARG)test_failed(); in test_repacketizer_api()
1809 test_failed(); in test_malloc_fail()
1816 test_failed(); in test_malloc_fail()
1829 test_failed(); in test_malloc_fail()
1836 test_failed(); in test_malloc_fail()
1847 test_failed(); in test_malloc_fail()
1880 if(!oversion)test_failed(); in main()
1882 if(opus_strerror(-32768)==NULL)test_failed(); in main()
1883 if(opus_strerror(32767)==NULL)test_failed(); in main()
1884 if(strlen(opus_strerror(0))<1)test_failed(); in main()