[FFmpeg-cvslog] eval: add gt(), gte(), lt() and lte() fate tests

Janne Grunau git at videolan.org
Sun Jul 15 01:35:00 CEST 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sat Jul 14 13:31:14 2012 +0200| [2d497c141d1fb6df290cdf45404b01ea1697d618] | committer: Janne Grunau

eval: add gt(), gte(), lt() and lte() fate tests

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d497c141d1fb6df290cdf45404b01ea1697d618
---

 libavutil/eval.c    |    8 ++++++++
 tests/ref/fate/eval |   24 ++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 77af2a3..ff3191d 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -596,6 +596,14 @@ int main(int argc, char **argv)
         "1Gi",
         "st(0, 123)",
         "st(1, 123); ld(1)",
+        "lte(0, 1)",
+        "lte(1, 1)",
+        "lte(1, 0)",
+        "lt(0, 1)",
+        "lt(1, 1)",
+        "gt(1, 0)",
+        "gt(2, 7)",
+        "gte(122, 122)",
         /* compute 1+2+...+N */
         "st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)",
         /* compute Fib(N) */
diff --git a/tests/ref/fate/eval b/tests/ref/fate/eval
index 13c218c..dfc5ae4 100644
--- a/tests/ref/fate/eval
+++ b/tests/ref/fate/eval
@@ -94,6 +94,30 @@ Evaluating 'st(0, 123)'
 Evaluating 'st(1, 123); ld(1)'
 'st(1, 123); ld(1)' -> 123.000000
 
+Evaluating 'lte(0, 1)'
+'lte(0, 1)' -> 1.000000
+
+Evaluating 'lte(1, 1)'
+'lte(1, 1)' -> 1.000000
+
+Evaluating 'lte(1, 0)'
+'lte(1, 0)' -> 0.000000
+
+Evaluating 'lt(0, 1)'
+'lt(0, 1)' -> 1.000000
+
+Evaluating 'lt(1, 1)'
+'lt(1, 1)' -> 0.000000
+
+Evaluating 'gt(1, 0)'
+'gt(1, 0)' -> 1.000000
+
+Evaluating 'gt(2, 7)'
+'gt(2, 7)' -> 0.000000
+
+Evaluating 'gte(122, 122)'
+'gte(122, 122)' -> 1.000000
+
 Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)'
 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 5050.000000
 



More information about the ffmpeg-cvslog mailing list