aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/fate
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-02-27 10:59:46 -0300
committerJames Almer <jamrial@gmail.com>2024-05-04 21:11:47 -0300
commit72ac4959606048343589efd282dd36b5dc9793e8 (patch)
tree8d1a2adb623dd0078a9275d8bcacf39f19acbbb6 /tests/ref/fate
parent2c77dc5aad2d3dde5fbe35e233e7a903584ff473 (diff)
downloadffmpeg-72ac4959606048343589efd282dd36b5dc9793e8.tar.gz
avutil/tests/opt: test negative values for INT and INT64 types
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tests/ref/fate')
-rw-r--r--tests/ref/fate/opt35
1 files changed, 30 insertions, 5 deletions
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt
index 0a3362e8fa..e90ec73e62 100644
--- a/tests/ref/fate/opt
+++ b/tests/ref/fate/opt
@@ -24,7 +24,7 @@ array_dict[0]: k00 v\00
array_dict[0]: k01 v,01
array_dict[1]: k10 v=1:0
TestContext AVOptions:
- -num <int> E.......... set num (from 0 to 100) (default 0)
+ -num <int> E.......... set num (from -1 to 100) (default 0)
-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")
@@ -43,7 +43,7 @@ TestContext AVOptions:
-bin <binary> E.......... set binary value
-bin1 <binary> E.......... set binary value
-bin2 <binary> E.......... set binary value
- -num64 <int64> E.......... set num 64bit (from 0 to 100) (default 1)
+ -num64 <int64> E.......... set num 64bit (from -1 to 100) (default 1)
-flt <float> E.......... set float (from 0 to 100) (default 0.333333)
-dbl <double> E.......... set double (from 0 to 100) (default 0.333333)
-bool1 <boolean> E.......... set boolean value (default auto)
@@ -337,6 +337,28 @@ Error 'bin=111'
Setting options string 'bin=ffff'
Setting entry with key 'bin' to value 'ffff'
OK 'bin=ffff'
+Setting options string 'num=bogus'
+Setting entry with key 'num' to value 'bogus'
+Undefined constant or missing '(' in 'bogus'
+Unable to parse option value "bogus"
+Error 'num=bogus'
+Setting options string 'num=44'
+Setting entry with key 'num' to value '44'
+OK 'num=44'
+Setting options string 'num=44.4'
+Setting entry with key 'num' to value '44.4'
+OK 'num=44.4'
+Setting options string 'num=-1'
+Setting entry with key 'num' to value '-1'
+OK 'num=-1'
+Setting options string 'num=-2'
+Setting entry with key 'num' to value '-2'
+Value -2.000000 for parameter 'num' out of range [-1 - 100]
+Error 'num=-2'
+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 'num64=bogus'
Setting entry with key 'num64' to value 'bogus'
Undefined constant or missing '(' in 'bogus'
@@ -350,11 +372,14 @@ Setting entry with key 'num64' to value '44.4'
OK 'num64=44.4'
Setting options string 'num64=-1'
Setting entry with key 'num64' to value '-1'
-Value -1.000000 for parameter 'num64' out of range [0 - 100]
-Error 'num64=-1'
+OK 'num64=-1'
+Setting options string 'num64=-2'
+Setting entry with key 'num64' to value '-2'
+Value -2.000000 for parameter 'num64' out of range [-1 - 100]
+Error 'num64=-2'
Setting options string 'num64=101'
Setting entry with key 'num64' to value '101'
-Value 101.000000 for parameter 'num64' out of range [0 - 100]
+Value 101.000000 for parameter 'num64' out of range [-1 - 100]
Error 'num64=101'
Setting options string 'flt=bogus'
Setting entry with key 'flt' to value 'bogus'