mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Added x86only
This commit is contained in:
parent
66de3dd1f9
commit
fce5623721
5 changed files with 46 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
make check
|
make check
|
||||||
pushd expressions && make check && popd
|
pushd expressions && make check && popd
|
||||||
pushd deep-expressions && make check && popd
|
pushd deep-expressions && make check && popd
|
||||||
|
pushd x86only && make check && popd
|
||||||
|
|
|
||||||
13
regression/x86only/Makefile
Normal file
13
regression/x86only/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
TESTS=$(basename $(wildcard test*.expr))
|
||||||
|
|
||||||
|
RC=../../src/rc.opt
|
||||||
|
|
||||||
|
.PHONY: check $(TESTS)
|
||||||
|
|
||||||
|
check: $(TESTS)
|
||||||
|
|
||||||
|
$(TESTS): %: %.expr
|
||||||
|
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f test*.log *.s *~ $(TESTS)
|
||||||
12
regression/x86only/orig/test001.log
Normal file
12
regression/x86only/orig/test001.log
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
`Empty
|
||||||
|
`Node (0, `Empty, `Empty)
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Empty))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Empty)))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Empty))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Empty)))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Empty))))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Node (6, `Empty, `Empty)))))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Node (6, `Empty, `Node (7, `Empty, `Empty))))))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Node (6, `Empty, `Node (7, `Empty, `Node (8, `Empty, `Empty)))))))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Node (6, `Empty, `Node (7, `Empty, `Node (8, `Empty, `Node (9, `Empty, `Empty))))))))))
|
||||||
|
`Node (0, `Empty, `Node (1, `Empty, `Node (2, `Empty, `Node (3, `Empty, `Node (4, `Empty, `Node (5, `Empty, `Node (6, `Empty, `Node (7, `Empty, `Node (8, `Empty, `Node (9, `Empty, `Node (10, `Empty, `Empty)))))))))))
|
||||||
19
regression/x86only/test001.expr
Normal file
19
regression/x86only/test001.expr
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
fun insert (tree, value) {
|
||||||
|
case tree of
|
||||||
|
`Empty -> return `Node (value, `Empty, `Empty)
|
||||||
|
| `Node (x, left, right) ->
|
||||||
|
if x > value
|
||||||
|
then return `Node (x, insert (left, value), right)
|
||||||
|
else return `Node (x, left, insert (right, value))
|
||||||
|
fi
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
tree := `Empty;
|
||||||
|
|
||||||
|
for i := 0, i <= 10, i := i+1 do
|
||||||
|
printf ("%s\n", tree.string);
|
||||||
|
tree := insert (tree, i)
|
||||||
|
od;
|
||||||
|
|
||||||
|
printf ("%s\n", tree.string)
|
||||||
1
regression/x86only/test001.input
Normal file
1
regression/x86only/test001.input
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue