fate: add opt-test

pull/95/head
Lukasz Marek 10 years ago
parent b54effba4f
commit db6be5416c
  1. 4
      tests/fate/libavutil.mak
  2. 90
      tests/ref/fate/opt

@ -107,6 +107,10 @@ FATE_LIBAVUTIL += fate-xtea
fate-xtea: libavutil/xtea-test$(EXESUF) fate-xtea: libavutil/xtea-test$(EXESUF)
fate-xtea: CMD = run libavutil/xtea-test fate-xtea: CMD = run libavutil/xtea-test
FATE_LIBAVUTIL += fate-opt
fate-opt: libavutil/opt-test$(EXESUF)
fate-opt: CMD = run libavutil/opt-test
FATE_LIBAVUTIL += $(FATE_LIBAVUTIL-yes) FATE_LIBAVUTIL += $(FATE_LIBAVUTIL-yes)
FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL) FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL)
fate-libavutil: $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL)

@ -0,0 +1,90 @@
Testing default values
num=0
toggle=1
string=default
flags=1
rational=1/1
video_rate=25/1
width=200 height=300
pix_fmt=0bgr
sample_fmt=s16
duration=1000
color=255 192 203 255
channel_layout=311=311
binary=62 69 6e 0
binary_size=4
num64=1
flt=0.333333
dbl=0.333333
Testing av_set_options_string()
OK ''
Error ':'
Error '='
Error 'foo=:'
Error ':=foo'
Error '=foo'
Error 'foo='
Error 'foo'
Error 'foo=val'
Error 'foo==val'
Error 'toggle=:'
OK 'string=:'
Error 'toggle=1 : foo'
Error 'toggle=100'
Error 'toggle==1'
OK 'flags=+mu-lame : num=42: toggle=0'
OK 'num=42 : string=blahblah'
Error 'rational=0 : rational=1/2 : rational=1/-1'
Error 'rational=-1/0'
OK 'size=1024x768'
OK 'size=pal'
Error 'size=bogus'
OK 'pix_fmt=yuv420p'
OK 'pix_fmt=2'
Error 'pix_fmt=bogus'
OK 'sample_fmt=s16'
OK 'sample_fmt=2'
Error 'sample_fmt=bogus'
OK 'video_rate=pal'
OK 'video_rate=25'
OK 'video_rate=30000/1001'
OK 'video_rate=30/1.001'
Error 'video_rate=bogus'
Error 'duration=bogus'
OK 'duration=123.45'
OK 'duration=1\:23\:45.67'
OK 'color=blue'
OK 'color=0x223300'
OK 'color=0x42FF07AA'
OK 'cl=stereo+downmix'
Error 'cl=foo'
Error 'bin=boguss'
Error 'bin=111'
OK 'bin=ffff'
Error 'num64=bogus'
OK 'num64=44'
OK 'num64=44.4'
Error 'num64=-1'
Error 'num64=101'
Error 'flt=bogus'
OK 'flt=2'
OK 'flt=2.2'
Error 'flt=-1'
Error 'flt=101'
Error 'dbl=bogus'
OK 'dbl=2'
OK 'dbl=2.2'
Error 'dbl=-1'
Error 'dbl=101'
Testing av_opt_set_from_string()
OK ''
OK '5'
OK '5:hello'
OK '5:hello:size=pal'
Error '5:size=pal:hello'
Error ':'
Error '='
OK ' 5 : hello : size = pal '
Error 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42'
Loading…
Cancel
Save