summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile2
-rw-r--r--tests/result/updown2.out31
-rw-r--r--tests/source/rfollow.scade2
-rw-r--r--tests/source/updown2.scade2
-rwxr-xr-xtests/testanalyze.sh6
5 files changed, 37 insertions, 6 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 67dce54..494449c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,7 +3,7 @@ ALL_OUT=result/limiter.out result/limitera.out result/locals.out \
result/train.out result/updown.out result/updown_fail.out \
result/test0.out result/test1.out result/test2.out result/test3.out \
result/test6.out result/testc.out \
- result/gilbreath.out result/half.out \
+ result/gilbreath.out result/half.out result/updown2.out \
result/rfollow.out result/cosinus.out
bin/%.test: source/%.scade test.c
diff --git a/tests/result/updown2.out b/tests/result/updown2.out
new file mode 100644
index 0000000..9b5b33d
--- /dev/null
+++ b/tests/result/updown2.out
@@ -0,0 +1,31 @@
+0. 1 -1 0
+1. 2 -2 0
+2. 3 -3 0
+3. 4 -4 0
+4. 5 -5 0
+5. 6 -6 0
+6. 7 -7 0
+7. 6 -6 0
+8. 5 -5 0
+9. 4 -4 0
+10. 3 -3 0
+11. 2 -2 0
+12. 1 -1 0
+13. 0 0 0
+14. -1 1 0
+15. -2 2 0
+16. -3 3 0
+17. -4 4 0
+18. -5 5 0
+19. -6 6 0
+20. -7 7 0
+21. -6 6 0
+22. -5 5 0
+23. -4 4 0
+24. -3 3 0
+25. -2 2 0
+26. -1 1 0
+27. 0 0 0
+28. 1 -1 0
+29. 2 -2 0
+30. 3 -3 0
diff --git a/tests/source/rfollow.scade b/tests/source/rfollow.scade
index c62c90d..16c862c 100644
--- a/tests/source/rfollow.scade
+++ b/tests/source/rfollow.scade
@@ -8,7 +8,7 @@ let
pf = 0. -> pre f;
f = (pf + a) / 2.0;
- prop = (f >= 0 and f <= 1.);
+ prop = (f >= 0. and f <= 1.);
guarantee g1: (true -> pre prop) and prop;
tel
diff --git a/tests/source/updown2.scade b/tests/source/updown2.scade
index 73d111a..29c34ff 100644
--- a/tests/source/updown2.scade
+++ b/tests/source/updown2.scade
@@ -1,6 +1,6 @@
const bound: int = 7;
-node updown() returns(probe x, probe y, probe z: int)
+node updown2() returns(probe x, probe y, probe z: int)
var last_x, last_y: int;
let
last_x = 0 -> pre x;
diff --git a/tests/testanalyze.sh b/tests/testanalyze.sh
index 8b1add2..d62c65a 100755
--- a/tests/testanalyze.sh
+++ b/tests/testanalyze.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-for a in source/*.scade; do
- if ../analyze --test $a > /tmp/analyze_out.txt;
+for a in result/*.out; do
+ if ../analyze --test source/`basename $a .out`.scade > /tmp/analyze_out.txt;
then
- if diff -B /tmp/analyze_out.txt result/`basename $a .scade`.out >/dev/null; then
+ if diff -B /tmp/analyze_out.txt $a >/dev/null; then
echo "OK $a"
else
echo "FAIL $a"