--- tests/fate/libavutil.mak | 4 +++ tests/ref/fate/opt | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+)
diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 63a4dd6..eadebdb 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -107,6 +107,10 @@ FATE_LIBAVUTIL += fate-xtea fate-xtea: libavutil/xtea-test$(EXESUF) 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-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt index e69de29..a14c558 100644 --- a/tests/ref/fate/opt +++ b/tests/ref/fate/opt @@ -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 setting options string: '' +Error setting options string: ':' +Error setting options string: '=' +Error setting options string: 'foo=:' +Error setting options string: ':=foo' +Error setting options string: '=foo' +Error setting options string: 'foo=' +Error setting options string: 'foo' +Error setting options string: 'foo=val' +Error setting options string: 'foo==val' +Error setting options string: 'toggle=:' +OK setting options string: 'string=:' +Error setting options string: 'toggle=1 : foo' +Error setting options string: 'toggle=100' +Error setting options string: 'toggle==1' +OK setting options string: 'flags=+mu-lame : num=42: toggle=0' +OK setting options string: 'num=42 : string=blahblah' +Error setting options string: 'rational=0 : rational=1/2 : rational=1/-1' +Error setting options string: 'rational=-1/0' +OK setting options string: 'size=1024x768' +OK setting options string: 'size=pal' +Error setting options string: 'size=bogus' +OK setting options string: 'pix_fmt=yuv420p' +OK setting options string: 'pix_fmt=2' +Error setting options string: 'pix_fmt=bogus' +OK setting options string: 'sample_fmt=s16' +OK setting options string: 'sample_fmt=2' +Error setting options string: 'sample_fmt=bogus' +OK setting options string: 'video_rate=pal' +OK setting options string: 'video_rate=25' +OK setting options string: 'video_rate=30000/1001' +OK setting options string: 'video_rate=30/1.001' +Error setting options string: 'video_rate=bogus' +Error setting options string: 'duration=bogus' +OK setting options string: 'duration=123.45' +OK setting options string: 'duration=1\:23\:45.67' +OK setting options string: 'color=blue' +OK setting options string: 'color=0x223300' +OK setting options string: 'color=0x42FF07AA' +OK setting options string: 'cl=stereo+downmix' +Error setting options string: 'cl=foo' +Error setting options string: 'bin=boguss' +Error setting options string: 'bin=111' +OK setting options string: 'bin=ffff' +Error setting options string: 'num64=bogus' +OK setting options string: 'num64=44' +OK setting options string: 'num64=44.4' +Error setting options string: 'num64=-1' +Error setting options string: 'num64=101' +Error setting options string: 'flt=bogus' +OK setting options string: 'flt=2' +OK setting options string: 'flt=2.2' +Error setting options string: 'flt=-1' +Error setting options string: 'flt=101' +Error setting options string: 'dbl=bogus' +OK setting options string: 'dbl=2' +OK setting options string: 'dbl=2.2' +Error setting options string: 'dbl=-1' +Error setting options string: 'dbl=101' + +Testing av_opt_set_from_string() +OK setting options string: '' +OK setting options string: '5' +OK setting options string: '5:hello' +OK setting options string: '5:hello:size=pal' +Error setting options string: '5:size=pal:hello' +Error setting options string: ':' +Error setting options string: '=' +OK setting options string: ' 5 : hello : size = pal ' +Error setting options string: 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42' -- 1.9.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel