History

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

Janne Grunau committed 14 years ago

Commit 2d497c11 parent caac3ab2 files · +32 −0Browse files

Unified · Split

2 files
  1. libavutil/eval.c +8 −0
  2. tests/ref/fate/eval +24 −0
libavutil/eval.c+8−0
@@ -596,6 +596,14 @@ int main(int argc, char **argv) · 595 unmodified lines
596596 "1Gi",
597597 "st(0, 123)",
598598 "st(1, 123); ld(1)",
599+ "lte(0, 1)",
600+ "lte(1, 1)",
601+ "lte(1, 0)",
602+ "lt(0, 1)",
603+ "lt(1, 1)",
604+ "gt(1, 0)",
605+ "gt(2, 7)",
606+ "gte(122, 122)",
599607 /* compute 1+2+...+N */
600608 "st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)",
601609 /* compute Fib(N) */
tests/ref/fate/eval+24−0
@@ -94,6 +94,30 @@ Evaluating 'st(0, 123)' · 93 unmodified lines
9494 Evaluating 'st(1, 123); ld(1)'
9595 'st(1, 123); ld(1)' -> 123.000000
9696
97+Evaluating 'lte(0, 1)'
98+'lte(0, 1)' -> 1.000000
99+
100+Evaluating 'lte(1, 1)'
101+'lte(1, 1)' -> 1.000000
102+
103+Evaluating 'lte(1, 0)'
104+'lte(1, 0)' -> 0.000000
105+
106+Evaluating 'lt(0, 1)'
107+'lt(0, 1)' -> 1.000000
108+
109+Evaluating 'lt(1, 1)'
110+'lt(1, 1)' -> 0.000000
111+
112+Evaluating 'gt(1, 0)'
113+'gt(1, 0)' -> 1.000000
114+
115+Evaluating 'gt(2, 7)'
116+'gt(2, 7)' -> 0.000000
117+
118+Evaluating 'gte(122, 122)'
119+'gte(122, 122)' -> 1.000000
120+
97121 Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)'
98122 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 5050.000000
99123

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t