diff options
author | James Almer <jamrial@gmail.com> | 2024-02-27 17:30:40 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-05-04 21:17:40 -0300 |
commit | d053290d8dd4dfddebc7285628360b67e185d63d (patch) | |
tree | 95242ccaaa0b116d373fdc7940c936e68396c450 /tests | |
parent | 9902fc550aec7215723e441edbe02f4dc40e6089 (diff) | |
download | ffmpeg-d053290d8dd4dfddebc7285628360b67e185d63d.tar.gz |
avutil/opt: add an unsigned option type
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ref/fate/opt | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt index 4e6112c8c5..578350bc33 100644 --- a/tests/ref/fate/opt +++ b/tests/ref/fate/opt @@ -1,5 +1,6 @@ Testing default values num=0 +unum=2147483648 toggle=1 string=default escape=\=, @@ -25,6 +26,7 @@ array_dict[0]: k01 v,01 array_dict[1]: k10 v=1:0 TestContext AVOptions: -num <int> E.......... set num (from -1 to 100) (default 0) + -unum <unsigned> E.......... set unum (from 0 to 2.14748e+09) (default 2147483648) -toggle <int> E.......... set toggle (from 0 to 1) (default 1) -rational <rational> E.......... set rational (from 0 to 10) (default 1/1) -string <string> E.......... set string (default "default") @@ -57,6 +59,7 @@ TestContext AVOptions: Testing av_opt_is_set_to_default() name: num default:1 error: +name: unum default:0 error: name: toggle default:0 error: name: rational default:0 error: name: string default:0 error: @@ -87,6 +90,7 @@ name: array_int default:0 error: name: array_str default:0 error: name:array_dict default:0 error: name: num default:1 error: +name: unum default:1 error: name: toggle default:1 error: name: rational default:1 error: name: string default:1 error: @@ -119,6 +123,7 @@ name:array_dict default:1 error: Testing av_opt_get/av_opt_set() name: num get: 0 set: OK get: 0 OK +name: unum get: 2147483648 set: OK get: 2147483648 OK name: toggle get: 1 set: OK get: 1 OK name: rational get: 1/1 set: OK get: 1/1 OK name: string get: default set: OK get: default OK @@ -150,8 +155,9 @@ array_dict=NULL; nb_array_dict=0 av_opt_get("array_dict") -> NULL Test av_opt_serialize() -num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=hexagonal,bin=62696E00,bin1=,bin2=,num64=4294967296,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-),array_int=,array_str=str0|str\\|1|str\\\\2,array_dict=k00\=v\\\\\\\\00:k01\=v\\\,01\,k10\=v\\\\\=1\\\\:0 +num=0,unum=2147483648,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=hexagonal,bin=62696E00,bin1=,bin2=,num64=4294967296,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-),array_int=,array_str=str0|str\\|1|str\\\\2,array_dict=k00\=v\\\\\\\\00:k01\=v\\\,01\,k10\=v\\\\\=1\\\\:0 Setting entry with key 'num' to value '0' +Setting entry with key 'unum' to value '2147483648' Setting entry with key 'toggle' to value '1' Setting entry with key 'rational' to value '1/1' Setting entry with key 'string' to value 'default' @@ -178,7 +184,7 @@ Setting entry with key 'dict2' to value 'happy=\:-)' Setting entry with key 'array_int' to value '' Setting entry with key 'array_str' to value 'str0|str\|1|str\\2' Setting entry with key 'array_dict' to value 'k00=v\\\\00:k01=v\,01,k10=v\\=1\\:0' -num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=hexagonal,bin=62696E00,bin1=,bin2=,num64=4294967296,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-),array_int=,array_str=str0|str\\|1|str\\\\2,array_dict=k00\=v\\\\\\\\00:k01\=v\\\,01\,k10\=v\\\\\=1\\\\:0 +num=0,unum=2147483648,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=hexagonal,bin=62696E00,bin1=,bin2=,num64=4294967296,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-),array_int=,array_str=str0|str\\|1|str\\\\2,array_dict=k00\=v\\\\\\\\00:k01\=v\\\,01\,k10\=v\\\\\=1\\\\:0 child_num=0,flt=0.333333,dbl=0.333333,array_int= Testing av_set_options_string() @@ -359,6 +365,28 @@ Setting options string 'num=101' Setting entry with key 'num' to value '101' Value 101.000000 for parameter 'num' out of range [-1 - 100] Error 'num=101' +Setting options string 'unum=bogus' +Setting entry with key 'unum' to value 'bogus' +Undefined constant or missing '(' in 'bogus' +Unable to parse option value "bogus" +Error 'unum=bogus' +Setting options string 'unum=44' +Setting entry with key 'unum' to value '44' +OK 'unum=44' +Setting options string 'unum=44.4' +Setting entry with key 'unum' to value '44.4' +OK 'unum=44.4' +Setting options string 'unum=-1' +Setting entry with key 'unum' to value '-1' +Value -1.000000 for parameter 'unum' out of range [0 - 2.14748e+09] +Error 'unum=-1' +Setting options string 'unum=2147483648' +Setting entry with key 'unum' to value '2147483648' +OK 'unum=2147483648' +Setting options string 'unum=2147483649' +Setting entry with key 'unum' to value '2147483649' +Value 2147483649.000000 for parameter 'unum' out of range [0 - 2.14748e+09] +Error 'unum=2147483649' Setting options string 'num64=bogus' Setting entry with key 'num64' to value 'bogus' Undefined constant or missing '(' in 'bogus' |