aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-10 12:51:04 +0100
committerMans Rullgard <mans@mansr.com>2012-10-10 13:33:45 +0100
commit41e46a5fbacc8ff51cac37f8e6fffd41fc226fbc (patch)
tree0fd5653efebdd8126ec3d52aadca11b9f040a35b
parentada12f836657648271972428b0e4a50c81eb7e15 (diff)
downloadffmpeg-41e46a5fbacc8ff51cac37f8e6fffd41fc226fbc.tar.gz
parseutils-test: do not print numerical error codes
The error codes differ between systems so printing the value makes the fate test fail on some systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--libavutil/parseutils.c4
-rw-r--r--tests/ref/fate/parseutils50
2 files changed, 27 insertions, 27 deletions
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index d3f08b72ed..b51f2e86ce 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -683,8 +683,8 @@ int main(void)
int ret;
AVRational q = (AVRational){0, 0};
ret = av_parse_video_rate(&q, rates[i]),
- printf("'%s' -> %d/%d ret:%d\n",
- rates[i], q.num, q.den, ret);
+ printf("'%s' -> %d/%d %s\n",
+ rates[i], q.num, q.den, ret ? "ERROR" : "OK");
}
}
diff --git a/tests/ref/fate/parseutils b/tests/ref/fate/parseutils
index 896c14d60d..01f6e08034 100644
--- a/tests/ref/fate/parseutils
+++ b/tests/ref/fate/parseutils
@@ -1,29 +1,29 @@
Testing av_parse_video_rate()
-'-inf' -> -1/0 ret:-22
-'inf' -> 1/0 ret:-22
-'nan' -> 0/0 ret:-22
-'123/0' -> 1/0 ret:-22
-'-123 / 0' -> -1/0 ret:-22
-'' -> 0/0 ret:-22
-'/' -> 0/0 ret:-22
-' 123 / 321' -> 41/107 ret:0
-'foo/foo' -> 0/0 ret:-22
-'foo/1' -> 0/0 ret:-22
-'1/foo' -> 0/0 ret:-22
-'0/0' -> 0/0 ret:-22
-'/0' -> 0/0 ret:-22
-'1/' -> 0/0 ret:-22
-'1' -> 1/1 ret:0
-'0' -> 0/1 ret:-22
-'-123/123' -> -1/1 ret:-22
-'-foo' -> 0/0 ret:-22
-'123.23' -> 12323/100 ret:0
-'.23' -> 23/100 ret:0
-'-.23' -> -23/100 ret:-22
-'-0.234' -> -117/500 ret:-22
-'-0.0000001' -> 0/1 ret:-22
-' 21332.2324 ' -> 917286/43 ret:0
-' -21332.2324 ' -> -917286/43 ret:-22
+'-inf' -> -1/0 ERROR
+'inf' -> 1/0 ERROR
+'nan' -> 0/0 ERROR
+'123/0' -> 1/0 ERROR
+'-123 / 0' -> -1/0 ERROR
+'' -> 0/0 ERROR
+'/' -> 0/0 ERROR
+' 123 / 321' -> 41/107 OK
+'foo/foo' -> 0/0 ERROR
+'foo/1' -> 0/0 ERROR
+'1/foo' -> 0/0 ERROR
+'0/0' -> 0/0 ERROR
+'/0' -> 0/0 ERROR
+'1/' -> 0/0 ERROR
+'1' -> 1/1 OK
+'0' -> 0/1 ERROR
+'-123/123' -> -1/1 ERROR
+'-foo' -> 0/0 ERROR
+'123.23' -> 12323/100 OK
+'.23' -> 23/100 OK
+'-.23' -> -23/100 ERROR
+'-0.234' -> -117/500 ERROR
+'-0.0000001' -> 0/1 ERROR
+' 21332.2324 ' -> 917286/43 OK
+' -21332.2324 ' -> -917286/43 ERROR
Testing av_parse_color()
red -> R(255) G(0) B(0) A(255)