webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
test_opus_api.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "arch.h"
#include "opus_multistream.h"
#include "opus.h"
#include "test_opus_common.h"

Macros

#define VG_UNDEF(x, y)
 
#define VG_CHECK(x, y)
 
#define UNDEFINE_FOR_PARSE
 
#define CHECK_SETGET(setcall, getcall, badv, badv2, goodv, goodv2, sok, gok)
 
#define max_out   (1276*48+48*2+2)
 

Functions

opus_int32 test_dec_api (void)
 
opus_int32 test_msdec_api (void)
 
opus_int32 test_parse (void)
 
opus_int32 test_enc_api (void)
 
int test_repacketizer_api (void)
 
int test_malloc_fail (void)
 
int main (int _argc, char **_argv)
 

Macro Definition Documentation

◆ CHECK_SETGET

#define CHECK_SETGET (   setcall,
  getcall,
  badv,
  badv2,
  goodv,
  goodv2,
  sok,
  gok 
)
Value:
i=(badv);\
if(opus_encoder_ctl(enc,setcall)==OPUS_OK)test_failed();\
i=(badv2);\
if(opus_encoder_ctl(enc,setcall)==OPUS_OK)test_failed();\
j=i=(goodv);\
if(opus_encoder_ctl(enc,setcall)!=OPUS_OK)test_failed();\
i=-12345;\
VG_UNDEF(&i,sizeof(i)); \
err=opus_encoder_ctl(enc,getcall);\
if(err!=OPUS_OK || i!=j)test_failed();\
j=i=(goodv2);\
if(opus_encoder_ctl(enc,setcall)!=OPUS_OK)test_failed();\
fprintf(stdout,sok);\
i=-12345;\
VG_UNDEF(&i,sizeof(i)); \
err=opus_encoder_ctl(enc,getcall);\
if(err!=OPUS_OK || i!=j)test_failed();\
fprintf(stdout,gok);\
cfgs+=6;
OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request,...) OPUS_ARG_NONNULL(1)
Definition: opus_encoder.c:2072
#define OPUS_OK
Definition: opus_defines.h:46
stdout
Definition: KeywordLookupGenerator.py:38
for i
Definition: complexityMeasures.m:24
for for j
Definition: complexityMeasures.m:25
#define test_failed()
Definition: test_opus_common.h:78

◆ max_out

#define max_out   (1276*48+48*2+2)

◆ UNDEFINE_FOR_PARSE

#define UNDEFINE_FOR_PARSE
Value:
toc=-1; \
frames[0]=(unsigned char *)0; \
frames[1]=(unsigned char *)0; \
payload_offset=-1;

◆ VG_CHECK

#define VG_CHECK (   x,
  y 
)

◆ VG_UNDEF

#define VG_UNDEF (   x,
  y 
)

Function Documentation

◆ main()

int main ( int  _argc,
char **  _argv 
)

◆ test_dec_api()

opus_int32 test_dec_api ( void  )

◆ test_enc_api()

opus_int32 test_enc_api ( void  )

◆ test_malloc_fail()

int test_malloc_fail ( void  )

◆ test_msdec_api()

opus_int32 test_msdec_api ( void  )

◆ test_parse()

opus_int32 test_parse ( void  )

◆ test_repacketizer_api()

int test_repacketizer_api ( void  )