Uncommented interpretation tests

This commit is contained in:
Roman Venediktov 2024-07-01 12:48:21 +02:00
parent 74e007c2ec
commit d1b1e04a40
5 changed files with 10 additions and 7 deletions

View file

@ -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:

View file

@ -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 *~

View file

@ -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 *~

View file

@ -1,4 +1,4 @@
0 > 0
15 15
15 15
1 1

View file

@ -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:{}));