mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Uncommented interpretation tests
This commit is contained in:
parent
74e007c2ec
commit
d1b1e04a40
5 changed files with 10 additions and 7 deletions
|
|
@ -17,8 +17,8 @@ check: $(TESTS) ctest111
|
||||||
|
|
||||||
$(TESTS): %: %.lama
|
$(TESTS): %: %.lama
|
||||||
@echo "regression/$@"
|
@echo "regression/$@"
|
||||||
# @cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||||
# @cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log
|
||||||
@LAMA=../runtime $(LAMAC) $< && cat $@.input | $(ARCH) ./$@ > $@.log && diff $@.log orig/$@.log
|
@LAMA=../runtime $(LAMAC) $< && cat $@.input | $(ARCH) ./$@ > $@.log && diff $@.log orig/$@.log
|
||||||
|
|
||||||
ctest111:
|
ctest111:
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ check: $(TESTS)
|
||||||
$(TESTS): %: %.lama
|
$(TESTS): %: %.lama
|
||||||
@echo "regression/deep-expressions/$@"
|
@echo "regression/deep-expressions/$@"
|
||||||
@LAMA=../../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
@LAMA=../../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||||
# @cat $@.input | LAMA=../../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||||
# @cat $@.input | LAMA=../../runtime $(LAMAC) -s $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../../runtime $(LAMAC) -s $< > $@.log && diff $@.log orig/$@.log
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.log *.s *~
|
rm -f *.log *.s *~
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ check: $(TESTS)
|
||||||
$(TESTS): %: %.lama
|
$(TESTS): %: %.lama
|
||||||
@echo "regression/expressions/$@"
|
@echo "regression/expressions/$@"
|
||||||
@LAMA=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
@LAMA=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||||
# @cat $@.input | LAMA=../../runtime $(RC) -i $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../../runtime $(RC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||||
# @cat $@.input | LAMA=../../runtime $(RC) -s $< > $@.log && diff $@.log orig/$@.log
|
@cat $@.input | LAMA=../../runtime $(RC) -s $< > $@.log && diff $@.log orig/$@.log
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.log *.s *~
|
rm -f *.log *.s *~
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
0
|
> 0
|
||||||
15
|
15
|
||||||
15
|
15
|
||||||
1
|
1
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
var n;
|
||||||
|
|
||||||
fun sum (l) {
|
fun sum (l) {
|
||||||
case l of
|
case l of
|
||||||
{} -> 0
|
{} -> 0
|
||||||
|
|
@ -21,6 +23,7 @@ fun array_to_list (a) {
|
||||||
l
|
l
|
||||||
}
|
}
|
||||||
|
|
||||||
|
n := read ();
|
||||||
write (sum ({}));
|
write (sum ({}));
|
||||||
write (sum ({1, 2, 3, 4, 5}));
|
write (sum ({1, 2, 3, 4, 5}));
|
||||||
write (sum (1:2:3:4:5:{}));
|
write (sum (1:2:3:4:5:{}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue