commit 052ed3fd4642b0e6d2331307ad4d253a74509bae parent 2b8fb8ff4ad2aea6bd6df8616a1a259d739f3d83 Author: Drew DeVault <sir@cmpwn.com> Date: Sun, 4 Jul 2021 19:37:42 -0400 Add temporary test suite for genN+1 Diffstat:
A | tests/900-basics.ha | | | 4 | ++++ |
M | tests/configure | | | 93 | ++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- |
2 files changed, 61 insertions(+), 36 deletions(-)
diff --git a/tests/900-basics.ha b/tests/900-basics.ha @@ -0,0 +1,4 @@ +export fn main() int = { + assert(true); + return 0; +}; diff --git a/tests/configure b/tests/configure @@ -2,47 +2,16 @@ all="$all tests" tests() { - # Hare tests + # Temporary test suite for t in \ - 00-constants \ - 01-arrays \ - 02-integers \ - 03-pointers \ - 04-strings \ - 05-implicit-casts \ - 06-structs \ - 07-aliases \ - 08-slices \ - 09-funcs \ - 10-binarithms \ - 11-globals \ - 12-loops \ - 13-tagged \ - 14-switch \ - 15-enums \ - 16-defer \ - 17-alloc \ - 18-match \ - 19-append \ - 20-if \ - 21-tuples \ - 22-delete \ - 23-errors \ - 24-imports \ - 25-promotion \ - 26-gen \ - 27-rt \ - 28-insert \ - 29-unarithm + 900-basics do cat <<EOF -tests/$t: libhart.a tests/$t.ha - @printf 'HAREC\t%s\t$@\n' "tests/$t" +tests/$t: tests/$t.ha + @printf 'HARECC\t%s\t$@\n' "tests/$t" @HARECACHE=\$(HARECACHE) ./harec -o tests/$t.ssa tests/$t.ha @\$(QBE) -o tests/$t.s tests/$t.ssa - @\$(AS) -o tests/$t.o tests/$t.s - @\$(LD) --gc-sections -T rt/hare.sc -o tests/$t $rtstart tests/$t.o libhart.a - @rm tests/$t.s tests/$t.ssa tests/$t.o + @\$(CC) -o tests/$t tests/$t.s check: tests/$t @@ -54,6 +23,58 @@ clean-tests: clean-test-$t EOF done +# # Hare tests +# for t in \ +# 00-constants \ +# 01-arrays \ +# 02-integers \ +# 03-pointers \ +# 04-strings \ +# 05-implicit-casts \ +# 06-structs \ +# 07-aliases \ +# 08-slices \ +# 09-funcs \ +# 10-binarithms \ +# 11-globals \ +# 12-loops \ +# 13-tagged \ +# 14-switch \ +# 15-enums \ +# 16-defer \ +# 17-alloc \ +# 18-match \ +# 19-append \ +# 20-if \ +# 21-tuples \ +# 22-delete \ +# 23-errors \ +# 24-imports \ +# 25-promotion \ +# 26-gen \ +# 27-rt \ +# 28-insert \ +# 29-unarithm +# do +# cat <<EOF +#tests/$t: libhart.a tests/$t.ha +# @printf 'HAREC\t%s\t$@\n' "tests/$t" +# @HARECACHE=\$(HARECACHE) ./harec -o tests/$t.ssa tests/$t.ha +# @\$(QBE) -o tests/$t.s tests/$t.ssa +# @\$(AS) -o tests/$t.o tests/$t.s +# @\$(LD) --gc-sections -T rt/hare.sc -o tests/$t $rtstart tests/$t.o libhart.a +# @rm tests/$t.s tests/$t.ssa tests/$t.o +# +#check: tests/$t +# +#clean-test-$t: +# @rm -f tests/$t +#.PHONY: clean-test-$t +# +#clean-tests: clean-test-$t +#EOF +# done + # C tests for t in \ 30-reduction