summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2019-12-25 19:35:34 +0100
committerMarton Balint <cus@passwd.hu>2019-12-27 21:52:21 +0100
commit672b925e8a3bd89891f1d875a00af113af290a05 (patch)
treeb35966469c32a93a3df847ef465ec530f4b4c9b3 /tests
parent5edacc46099725f59ac81bdbff991b0daf4b3a7c (diff)
downloadffmpeg-672b925e8a3bd89891f1d875a00af113af290a05.tar.gz
avutil/tests/opt: add tests for AV_OPT_TYPE_DICT
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/fate/opt15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt
index 71f56ce51e..4054d32295 100644
--- a/tests/ref/fate/opt
+++ b/tests/ref/fate/opt
@@ -43,6 +43,8 @@ TestContext AVOptions:
-bool1 <boolean> E......... set boolean value (default auto)
-bool2 <boolean> E......... set boolean value (default true)
-bool3 <boolean> E......... set boolean value (default false)
+ -dict1 <dictionary> E......... set dictionary value
+ -dict2 <dictionary> E......... set dictionary value (default "happy=':-)'")
Testing av_opt_is_set_to_default()
name: num default:1 error:
@@ -70,6 +72,8 @@ name: dbl default:0 error:
name: bool1 default:0 error:
name: bool2 default:0 error:
name: bool3 default:1 error:
+name: dict1 default:1 error:
+name: dict2 default:0 error:
name: num default:1 error:
name: toggle default:1 error:
name: rational default:1 error:
@@ -95,9 +99,11 @@ name: dbl default:1 error:
name: bool1 default:1 error:
name: bool2 default:1 error:
name: bool3 default:1 error:
+name: dict1 default:1 error:
+name: dict2 default:1 error:
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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
+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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-)
Setting entry with key 'num' to value '0'
Setting entry with key 'toggle' to value '1'
Setting entry with key 'rational' to value '1/1'
@@ -120,7 +126,9 @@ Setting entry with key 'dbl' to value '0.333333'
Setting entry with key 'bool1' to value 'auto'
Setting entry with key 'bool2' to value 'true'
Setting entry with key 'bool3' to value 'false'
-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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
+Setting entry with key 'dict1' to value ''
+Setting entry with key 'dict2' to value 'happy=\:-)'
+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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-)
Testing av_set_options_string()
Setting options string ''
@@ -341,6 +349,9 @@ OK 'bool1=true'
Setting options string 'bool2=auto'
Setting entry with key 'bool2' to value 'auto'
OK 'bool2=auto'
+Setting options string 'dict1='happy=\:-):sad=\:-(''
+Setting entry with key 'dict1' to value 'happy=\:-):sad=\:-('
+OK 'dict1='happy=\:-):sad=\:-(''
Testing av_opt_set_from_string()
Setting options string ''