mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-05 05:28:15 +00:00
Better error reporting; synched with ostap
This commit is contained in:
parent
290c124be6
commit
b6180d8634
13 changed files with 59 additions and 68 deletions
3
regression/x86only/Lib01.expr
Normal file
3
regression/x86only/Lib01.expr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
public fun from_test005 (s) {
|
||||
printf ("called with %s\n", s)
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
TESTS=$(sort $(basename $(wildcard test*.expr)))
|
||||
LIBS=$(sort $(basename $(wildcard Lib*.expr)).o)
|
||||
|
||||
RC=../../src/rc.opt
|
||||
|
||||
|
|
@ -6,8 +7,11 @@ RC=../../src/rc.opt
|
|||
|
||||
check: $(TESTS)
|
||||
|
||||
$(TESTS): %: %.expr
|
||||
@RC_RUNTIME=../../runtime $(RC) -I . $< && cat $@.input | ./$@ > $@.log && diff -u $@.log orig/$@.log
|
||||
%.o: %.expr
|
||||
RC_RUNTIME=../../runtime $(RC) -c -I . $<
|
||||
|
||||
$(TESTS): %: %.expr $(LIBS)
|
||||
RC_RUNTIME=../../runtime $(RC) -I . $< && cat $@.input | ./$@ > $@.log && diff -u $@.log orig/$@.log
|
||||
|
||||
clean:
|
||||
rm -f test*.log *.s *~ $(TESTS)
|
||||
rm -f test*.log *.i *.o *.s *~ $(TESTS)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
called with this one
|
||||
called with that one
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
-1
|
||||
1
|
||||
0
|
||||
-1
|
||||
1
|
||||
0
|
||||
-1
|
||||
1
|
||||
0
|
||||
0
|
||||
-1
|
||||
1
|
||||
-1
|
||||
1
|
||||
0
|
||||
-51
|
||||
51
|
||||
0
|
||||
-1
|
||||
3
|
||||
0
|
||||
0
|
||||
31
|
||||
-1
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
public fun from_test005 (s) {
|
||||
printf ("called with %s\n", s)
|
||||
}
|
||||
import Lib01;
|
||||
|
||||
from_test005 ("this one")
|
||||
from_test005 ("that one")
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import test005;
|
||||
|
||||
from_test005 ("that one")
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
fun f (x) {
|
||||
return fun (y) {return x + y}
|
||||
}
|
||||
|
||||
write (compare (1, 2));
|
||||
write (compare (2, 1));
|
||||
write (compare (3, 3));
|
||||
write (compare (2, "abc"));
|
||||
write (compare ("abc", 2));
|
||||
write (compare ("abc", "abc"));
|
||||
write (compare ("ab", "abc"));
|
||||
write (compare ("abc", "ab"));
|
||||
write (compare ([], []));
|
||||
write (compare (A, A));
|
||||
write (compare (A, B));
|
||||
write (compare (B, A));
|
||||
write (compare (A (1), A (1, 1)));
|
||||
write (compare (A (1, 1), A (1)));
|
||||
write (compare (f, f));
|
||||
write (compare (f, f(5)));
|
||||
write (compare (f(5), f));
|
||||
write (compare (f(5), f(5)));
|
||||
write (compare (f(5), f(6)));
|
||||
write (compare (f(6), f(5)));
|
||||
write (compare ({1, 2, 3}, {1, 2, 3}));
|
||||
write (compare ({1, [2], [[3]]}, {1, [2], [[3]]}));
|
||||
write (compare ({1, [2], [[3]]}, {1, [2], [3]}));
|
||||
write (compare ({1, [2], [3]}, {1, [2], [[3]]}))
|
||||
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
I,Std;
|
||||
Loading…
Add table
Add a link
Reference in a new issue