diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 40 | ||||
| -rw-r--r-- | tests/alias/alias.ek (renamed from tests/alias.ek) | 2 | ||||
| -rw-r--r-- | tests/alias/source.mk | 1 | ||||
| -rw-r--r-- | tests/call/call.ek (renamed from tests/call.ek) | 0 | ||||
| -rw-r--r-- | tests/call/source.mk | 1 | ||||
| -rw-r--r-- | tests/callbacks/callbacks.ek (renamed from tests/callbacks.ek) | 0 | ||||
| -rw-r--r-- | tests/callbacks/source.mk | 1 | ||||
| -rwxr-xr-x | tests/check.sh | 36 | ||||
| -rw-r--r-- | tests/defer/defer.ek (renamed from tests/defer.ek) | 0 | ||||
| -rw-r--r-- | tests/defer/source.mk | 1 | ||||
| -rw-r--r-- | tests/defer_shadow/defer_shadow.ek (renamed from tests/defer_shadow.ek) | 0 | ||||
| -rw-r--r-- | tests/defer_shadow/source.mk | 1 | ||||
| -rw-r--r-- | tests/empty/empty.ek (renamed from tests/empty.ek) | 0 | ||||
| -rw-r--r-- | tests/empty/source.mk | 1 | ||||
| -rw-r--r-- | tests/enums/enums.ek (renamed from tests/enums.ek) | 0 | ||||
| -rw-r--r-- | tests/enums/source.mk | 1 | ||||
| -rw-r--r-- | tests/fib/fib.ek (renamed from tests/fib.ek) | 0 | ||||
| -rw-r--r-- | tests/fib/source.mk | 1 | ||||
| -rw-r--r-- | tests/generic/generic.ek (renamed from tests/generic.ek) | 0 | ||||
| -rw-r--r-- | tests/generic/source.mk | 1 | ||||
| -rw-r--r-- | tests/generic_defer/generic_defer.ek (renamed from tests/generic_defer.ek) | 0 | ||||
| -rw-r--r-- | tests/generic_defer/source.mk | 1 | ||||
| -rw-r--r-- | tests/if/if.ek (renamed from tests/if.ek) | 0 | ||||
| -rw-r--r-- | tests/if/source.mk | 1 | ||||
| -rw-r--r-- | tests/if2/if2.ek (renamed from tests/if2.ek) | 0 | ||||
| -rw-r--r-- | tests/if2/source.mk | 1 | ||||
| -rw-r--r-- | tests/import/pub_import_hello.ek | 1 | ||||
| -rw-r--r-- | tests/loop/loop.ek (renamed from tests/loop.ek) | 0 | ||||
| -rw-r--r-- | tests/loop/source.mk | 1 | ||||
| -rw-r--r-- | tests/main/main.ek (renamed from tests/main.ek) | 0 | ||||
| -rw-r--r-- | tests/main/source.mk | 1 | ||||
| -rw-r--r-- | tests/nested_structs/nested_structs.ek (renamed from tests/nested_structs.ek) | 0 | ||||
| -rw-r--r-- | tests/nested_structs/source.mk | 1 | ||||
| -rw-r--r-- | tests/pointer_literal/pointer_literal.ek (renamed from tests/pointer_literal.ek) | 0 | ||||
| -rw-r--r-- | tests/pointer_literal/source.mk | 1 | ||||
| -rw-r--r-- | tests/priv_hello/check.mk | 1 | ||||
| -rw-r--r-- | tests/priv_hello/import/priv_hello.ek (renamed from tests/import/priv_hello.ek) | 0 | ||||
| -rw-r--r-- | tests/priv_hello/priv_hello.ek (renamed from tests/priv_hello.ek) | 0 | ||||
| -rw-r--r-- | tests/priv_hello/source.mk | 1 | ||||
| -rw-r--r-- | tests/ptr/ptr.ek (renamed from tests/ptr.ek) | 0 | ||||
| -rw-r--r-- | tests/ptr/source.mk | 1 | ||||
| -rw-r--r-- | tests/pub_hello/import/pub_hello.ek (renamed from tests/import/pub_hello.ek) | 0 | ||||
| -rw-r--r-- | tests/pub_hello/pub_hello.ek (renamed from tests/pub_hello.ek) | 0 | ||||
| -rw-r--r-- | tests/pub_hello/source.mk | 1 | ||||
| -rw-r--r-- | tests/pub_import_hello.ek | 6 | ||||
| -rw-r--r-- | tests/refderef/refderef.ek (renamed from tests/refderef.ek) | 0 | ||||
| -rw-r--r-- | tests/refderef/source.mk | 1 | ||||
| -rw-r--r-- | tests/rvalue/rvalue.ek (renamed from tests/rvalue.ek) | 0 | ||||
| -rw-r--r-- | tests/rvalue/source.mk | 1 | ||||
| -rwxr-xr-x | tests/scripts/gen-simple | 14 | ||||
| -rwxr-xr-x | tests/scripts/gen-simple-xfail | 29 | ||||
| -rw-r--r-- | tests/scripts/makefile | 16 | ||||
| -rw-r--r-- | tests/struct_call/source.mk | 1 | ||||
| -rw-r--r-- | tests/struct_call/struct_call.ek (renamed from tests/struct_call.ek) | 0 | ||||
| -rw-r--r-- | tests/struct_call_ref/source.mk | 1 | ||||
| -rw-r--r-- | tests/struct_call_ref/struct_call_ref.ek (renamed from tests/struct_call_ref.ek) | 0 | ||||
| -rw-r--r-- | tests/struct_cont/source.mk | 1 | ||||
| -rw-r--r-- | tests/struct_cont/struct_cont.ek (renamed from tests/parse/struct_cont.ek) | 0 | ||||
| -rw-r--r-- | tests/structs/source.mk | 1 | ||||
| -rw-r--r-- | tests/structs/structs.ek (renamed from tests/structs.ek) | 0 | ||||
| -rw-r--r-- | tests/trait_expand/source.mk | 1 | ||||
| -rw-r--r-- | tests/trait_expand/trait_expand.ek (renamed from tests/trait_expand.ek) | 0 | ||||
| -rw-r--r-- | tests/trait_multiple_expand/source.mk | 1 | ||||
| -rw-r--r-- | tests/trait_multiple_expand/trait_multiple_expand.ek (renamed from tests/trait_multiple_expand.ek) | 0 | ||||
| -rw-r--r-- | tests/trait_recursive_expand/source.mk | 1 | ||||
| -rw-r--r-- | tests/trait_recursive_expand/trait_recursive_expand.ek (renamed from tests/trait_recursive_expand.ek) | 0 | ||||
| -rw-r--r-- | tests/ufcs/source.mk | 1 | ||||
| -rw-r--r-- | tests/ufcs/ufcs.ek (renamed from tests/ufcs.ek) | 0 | ||||
| -rw-r--r-- | tests/variadic/source.mk | 1 | ||||
| -rw-r--r-- | tests/variadic/variadic.ek (renamed from tests/variadic.ek) | 0 | ||||
| -rw-r--r-- | tests/vars.ek | 33 |
71 files changed, 131 insertions, 77 deletions
diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..9741247 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,40 @@ +check: + $(MAKE) -f scripts/makefile check + +.DEFAULT: + $(MAKE) -f scripts/makefile $< + +SOURCES != echo */source.mk +DO != echo -n > tests.mk && rm -rf reports + +# hmm, initially I had each test call a gen-simple with command line arguments +# and all but thought that running a script for each test would be too slow, so +# I tried to simplify things by making the trivial cases just append a string to +# a make variable. Apparently it didn't end up having a significant effect since +# the bottleneck was actually my SSD write speed, since all output from the test +# programs gets collected. +# +# I guess the previous approach was slightly less hacky but I'll go with this +# for now, at least it (probably) scales slightly better :) More exotic tests +# can still generate their own test cases fairly easily + +# basic tests that shouldn't cause the return code to be nonzero +SIMPLE := +# simple tests where we expect the compiler to error out with some message, +# see tests/empty for an example of usage +SIMPLE_XFAIL := + +include $(SOURCES) + +# pass through xargs to 'trick' it into expanding each SIMPLE_XFAIL into a +# separate argument for the script, as make would otherwise just split at each space +# this way we can pass spaces as arguments to the generator scripts, pretty neat +# huh? +DO != echo "$(SIMPLE)" | xargs ./scripts/gen-simple +DO != echo "$(SIMPLE_XFAIL)" | xargs ./scripts/gen-simple-xfail + +RM ?= rm + +.PHONY: clean +clean: + $(RM) -rf reports diff --git a/tests/alias.ek b/tests/alias/alias.ek index c6a26d6..2066506 100644 --- a/tests/alias.ek +++ b/tests/alias/alias.ek @@ -5,5 +5,5 @@ typedef int i27; main() { - int a = 10 as i9; + int a = 10 as i27; } diff --git a/tests/alias/source.mk b/tests/alias/source.mk new file mode 100644 index 0000000..cc799ef --- /dev/null +++ b/tests/alias/source.mk @@ -0,0 +1 @@ +SIMPLE += alias diff --git a/tests/call.ek b/tests/call/call.ek index 86d6ed0..86d6ed0 100644 --- a/tests/call.ek +++ b/tests/call/call.ek diff --git a/tests/call/source.mk b/tests/call/source.mk new file mode 100644 index 0000000..3e9da8c --- /dev/null +++ b/tests/call/source.mk @@ -0,0 +1 @@ +SIMPLE += call diff --git a/tests/callbacks.ek b/tests/callbacks/callbacks.ek index 927c122..927c122 100644 --- a/tests/callbacks.ek +++ b/tests/callbacks/callbacks.ek diff --git a/tests/callbacks/source.mk b/tests/callbacks/source.mk new file mode 100644 index 0000000..75a9fa8 --- /dev/null +++ b/tests/callbacks/source.mk @@ -0,0 +1 @@ +SIMPLE += callbacks diff --git a/tests/check.sh b/tests/check.sh deleted file mode 100755 index 397d36d..0000000 --- a/tests/check.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -echo > check.log - -tests=0 -passed=0 -failed=0 - -for file in $(echo check/*.cu) -do - testcase=$(echo "$file" | cut -f 1 -d '.') - expected="$testcase".ok - args=$(test -e "$testcase".args && cat "$testcase".args) - - echo -n testing "$testcase"... - - cmd="./cu "$args" "$file" -o check/run && ./check/run" - - tests=$((tests + 1)) - if test "$output" = "$expected" - then - passed=$((passed + 1)) - echo ok - else - failed=$((failed + 1)) - echo fail - fi; - - if test -n "$VERBOSE" - then - echo "$cmd" - fi -done - -echo -echo tests "$tests", passed "$passed", failed "$failed" diff --git a/tests/defer.ek b/tests/defer/defer.ek index 839cc4d..839cc4d 100644 --- a/tests/defer.ek +++ b/tests/defer/defer.ek diff --git a/tests/defer/source.mk b/tests/defer/source.mk new file mode 100644 index 0000000..5d0cf21 --- /dev/null +++ b/tests/defer/source.mk @@ -0,0 +1 @@ +SIMPLE += defer diff --git a/tests/defer_shadow.ek b/tests/defer_shadow/defer_shadow.ek index 0e890a2..0e890a2 100644 --- a/tests/defer_shadow.ek +++ b/tests/defer_shadow/defer_shadow.ek diff --git a/tests/defer_shadow/source.mk b/tests/defer_shadow/source.mk new file mode 100644 index 0000000..30b5c23 --- /dev/null +++ b/tests/defer_shadow/source.mk @@ -0,0 +1 @@ +SIMPLE += defer_shadow diff --git a/tests/empty.ek b/tests/empty/empty.ek index e69de29..e69de29 100644 --- a/tests/empty.ek +++ b/tests/empty/empty.ek diff --git a/tests/empty/source.mk b/tests/empty/source.mk new file mode 100644 index 0000000..f7198f0 --- /dev/null +++ b/tests/empty/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += empty,'no main' diff --git a/tests/enums.ek b/tests/enums/enums.ek index ef7850c..ef7850c 100644 --- a/tests/enums.ek +++ b/tests/enums/enums.ek diff --git a/tests/enums/source.mk b/tests/enums/source.mk new file mode 100644 index 0000000..24ac839 --- /dev/null +++ b/tests/enums/source.mk @@ -0,0 +1 @@ +SIMPLE += enums diff --git a/tests/fib.ek b/tests/fib/fib.ek index a9cc5fb..a9cc5fb 100644 --- a/tests/fib.ek +++ b/tests/fib/fib.ek diff --git a/tests/fib/source.mk b/tests/fib/source.mk new file mode 100644 index 0000000..3957f6a --- /dev/null +++ b/tests/fib/source.mk @@ -0,0 +1 @@ +SIMPLE += fib diff --git a/tests/generic.ek b/tests/generic/generic.ek index 065477e..065477e 100644 --- a/tests/generic.ek +++ b/tests/generic/generic.ek diff --git a/tests/generic/source.mk b/tests/generic/source.mk new file mode 100644 index 0000000..31e7427 --- /dev/null +++ b/tests/generic/source.mk @@ -0,0 +1 @@ +SIMPLE += generic diff --git a/tests/generic_defer.ek b/tests/generic_defer/generic_defer.ek index cb11154..cb11154 100644 --- a/tests/generic_defer.ek +++ b/tests/generic_defer/generic_defer.ek diff --git a/tests/generic_defer/source.mk b/tests/generic_defer/source.mk new file mode 100644 index 0000000..b0a041d --- /dev/null +++ b/tests/generic_defer/source.mk @@ -0,0 +1 @@ +SIMPLE += generic_defer diff --git a/tests/if.ek b/tests/if/if.ek index e3e08d7..e3e08d7 100644 --- a/tests/if.ek +++ b/tests/if/if.ek diff --git a/tests/if/source.mk b/tests/if/source.mk new file mode 100644 index 0000000..8e1fdde --- /dev/null +++ b/tests/if/source.mk @@ -0,0 +1 @@ +SIMPLE += if diff --git a/tests/if2.ek b/tests/if2/if2.ek index 0932155..0932155 100644 --- a/tests/if2.ek +++ b/tests/if2/if2.ek diff --git a/tests/if2/source.mk b/tests/if2/source.mk new file mode 100644 index 0000000..6fabbe9 --- /dev/null +++ b/tests/if2/source.mk @@ -0,0 +1 @@ +SIMPLE += if2 diff --git a/tests/import/pub_import_hello.ek b/tests/import/pub_import_hello.ek deleted file mode 100644 index 839f83a..0000000 --- a/tests/import/pub_import_hello.ek +++ /dev/null @@ -1 +0,0 @@ -pub import "pub_hello.ek"; diff --git a/tests/loop.ek b/tests/loop/loop.ek index 6ecf439..6ecf439 100644 --- a/tests/loop.ek +++ b/tests/loop/loop.ek diff --git a/tests/loop/source.mk b/tests/loop/source.mk new file mode 100644 index 0000000..0796330 --- /dev/null +++ b/tests/loop/source.mk @@ -0,0 +1 @@ +SIMPLE += loop diff --git a/tests/main.ek b/tests/main/main.ek index 05437c5..05437c5 100644 --- a/tests/main.ek +++ b/tests/main/main.ek diff --git a/tests/main/source.mk b/tests/main/source.mk new file mode 100644 index 0000000..7cc0734 --- /dev/null +++ b/tests/main/source.mk @@ -0,0 +1 @@ +SIMPLE += main diff --git a/tests/nested_structs.ek b/tests/nested_structs/nested_structs.ek index 1429a77..1429a77 100644 --- a/tests/nested_structs.ek +++ b/tests/nested_structs/nested_structs.ek diff --git a/tests/nested_structs/source.mk b/tests/nested_structs/source.mk new file mode 100644 index 0000000..9632763 --- /dev/null +++ b/tests/nested_structs/source.mk @@ -0,0 +1 @@ +SIMPLE += nested_structs diff --git a/tests/pointer_literal.ek b/tests/pointer_literal/pointer_literal.ek index ade7988..ade7988 100644 --- a/tests/pointer_literal.ek +++ b/tests/pointer_literal/pointer_literal.ek diff --git a/tests/pointer_literal/source.mk b/tests/pointer_literal/source.mk new file mode 100644 index 0000000..49e52a9 --- /dev/null +++ b/tests/pointer_literal/source.mk @@ -0,0 +1 @@ +SIMPLE += pointer_literal diff --git a/tests/priv_hello/check.mk b/tests/priv_hello/check.mk new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/priv_hello/check.mk @@ -0,0 +1 @@ + diff --git a/tests/import/priv_hello.ek b/tests/priv_hello/import/priv_hello.ek index 970efcd..970efcd 100644 --- a/tests/import/priv_hello.ek +++ b/tests/priv_hello/import/priv_hello.ek diff --git a/tests/priv_hello.ek b/tests/priv_hello/priv_hello.ek index fe6fa86..fe6fa86 100644 --- a/tests/priv_hello.ek +++ b/tests/priv_hello/priv_hello.ek diff --git a/tests/priv_hello/source.mk b/tests/priv_hello/source.mk new file mode 100644 index 0000000..b2160b2 --- /dev/null +++ b/tests/priv_hello/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += priv_hello,'no such symbol' diff --git a/tests/ptr.ek b/tests/ptr/ptr.ek index 86f413c..86f413c 100644 --- a/tests/ptr.ek +++ b/tests/ptr/ptr.ek diff --git a/tests/ptr/source.mk b/tests/ptr/source.mk new file mode 100644 index 0000000..abdd059 --- /dev/null +++ b/tests/ptr/source.mk @@ -0,0 +1 @@ +SIMPLE += ptr diff --git a/tests/import/pub_hello.ek b/tests/pub_hello/import/pub_hello.ek index f26624e..f26624e 100644 --- a/tests/import/pub_hello.ek +++ b/tests/pub_hello/import/pub_hello.ek diff --git a/tests/pub_hello.ek b/tests/pub_hello/pub_hello.ek index 9dd65d2..9dd65d2 100644 --- a/tests/pub_hello.ek +++ b/tests/pub_hello/pub_hello.ek diff --git a/tests/pub_hello/source.mk b/tests/pub_hello/source.mk new file mode 100644 index 0000000..470342b --- /dev/null +++ b/tests/pub_hello/source.mk @@ -0,0 +1 @@ +SIMPLE += pub_hello diff --git a/tests/pub_import_hello.ek b/tests/pub_import_hello.ek deleted file mode 100644 index 7765efb..0000000 --- a/tests/pub_import_hello.ek +++ /dev/null @@ -1,6 +0,0 @@ -import "import/pub_import_hello.ek"; - -main() -{ - hello(); -} diff --git a/tests/refderef.ek b/tests/refderef/refderef.ek index ff020e7..ff020e7 100644 --- a/tests/refderef.ek +++ b/tests/refderef/refderef.ek diff --git a/tests/refderef/source.mk b/tests/refderef/source.mk new file mode 100644 index 0000000..840eb16 --- /dev/null +++ b/tests/refderef/source.mk @@ -0,0 +1 @@ +SIMPLE += refderef diff --git a/tests/rvalue.ek b/tests/rvalue/rvalue.ek index 4864fae..4864fae 100644 --- a/tests/rvalue.ek +++ b/tests/rvalue/rvalue.ek diff --git a/tests/rvalue/source.mk b/tests/rvalue/source.mk new file mode 100644 index 0000000..2b2fba6 --- /dev/null +++ b/tests/rvalue/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += rvalue,'rvalue used where lvalue required' diff --git a/tests/scripts/gen-simple b/tests/scripts/gen-simple new file mode 100755 index 0000000..cf4c35c --- /dev/null +++ b/tests/scripts/gen-simple @@ -0,0 +1,14 @@ +#!/bin/sh + +mkdir -p $(for d in "${@}"; do echo "$d"; done | uniq | sed "s|^|reports/|") + +for s in "${@}" +do + echo ".PHONY: $s" >> tests.mk + echo "$s:" >> tests.mk + echo " @../ek $s/$s.ek > reports/$s/log 2>&1\\" >> tests.mk + echo " && echo OK > reports/$s/OK \\" >> tests.mk + echo " || echo ERR > reports/$s/OK" >> tests.mk +done + +echo "TESTS += " "${@}" >> tests.mk diff --git a/tests/scripts/gen-simple-xfail b/tests/scripts/gen-simple-xfail new file mode 100755 index 0000000..bb8c5ae --- /dev/null +++ b/tests/scripts/gen-simple-xfail @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p $(for d in "${@}"; do echo "$d"; done \ + | sed "s|,.*||" | uniq | sed "s|^|reports/|") + +for s in "${@}" +do + NAME=${s%%,*} + EMSG=${s#${NAME},} + echo ".PHONY: $NAME" >> tests.mk + echo "$NAME:" >> tests.mk + echo " @../ek $NAME/$NAME.ek > reports/$NAME/log 2>&1 \\" >> tests.mk + echo " && echo 'Wrong retval' > reports/$NAME/OK \\" >> tests.mk + echo " || :" >> tests.mk + echo " @grep '$EMSG' reports/$NAME/log > /dev/null; \\" >> tests.mk + echo " [ \$\$? -eq 0 ] \\" >> tests.mk + echo " && echo OK > reports/$NAME/OK \\" >> tests.mk + echo " || echo EMSG > reports/$NAME/OK" >> tests.mk +done + +echo -n "TESTS +=" >> tests.mk +for s in "${@}" +do + NAME=${s%%,*} + echo -n " $NAME" >> tests.mk +done + +# append newline +echo "" >> tests.mk diff --git a/tests/scripts/makefile b/tests/scripts/makefile new file mode 100644 index 0000000..a85d373 --- /dev/null +++ b/tests/scripts/makefile @@ -0,0 +1,16 @@ +.PHONY: all +all: check + +TESTS := +include tests.mk + +.PHONY: check +check: $(TESTS) + @cd reports; for d in * ; do \ + if [ ! -f "$$d/OK" ]; then \ + echo "BROKEN: $$d" ; \ + elif [ "$$(tail -n1 $$d/OK)" != "OK" ]; then \ + echo "FAIL: $$d" ; \ + fi \ + done + @echo "Done." diff --git a/tests/struct_call/source.mk b/tests/struct_call/source.mk new file mode 100644 index 0000000..fccd735 --- /dev/null +++ b/tests/struct_call/source.mk @@ -0,0 +1 @@ +SIMPLE += struct_call diff --git a/tests/struct_call.ek b/tests/struct_call/struct_call.ek index 7d2559b..7d2559b 100644 --- a/tests/struct_call.ek +++ b/tests/struct_call/struct_call.ek diff --git a/tests/struct_call_ref/source.mk b/tests/struct_call_ref/source.mk new file mode 100644 index 0000000..115eb3b --- /dev/null +++ b/tests/struct_call_ref/source.mk @@ -0,0 +1 @@ +SIMPLE += struct_call_ref diff --git a/tests/struct_call_ref.ek b/tests/struct_call_ref/struct_call_ref.ek index e1ec9d9..e1ec9d9 100644 --- a/tests/struct_call_ref.ek +++ b/tests/struct_call_ref/struct_call_ref.ek diff --git a/tests/struct_cont/source.mk b/tests/struct_cont/source.mk new file mode 100644 index 0000000..b986282 --- /dev/null +++ b/tests/struct_cont/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += struct_cont,'unknown top element' diff --git a/tests/parse/struct_cont.ek b/tests/struct_cont/struct_cont.ek index f4799aa..f4799aa 100644 --- a/tests/parse/struct_cont.ek +++ b/tests/struct_cont/struct_cont.ek diff --git a/tests/structs/source.mk b/tests/structs/source.mk new file mode 100644 index 0000000..cc89d06 --- /dev/null +++ b/tests/structs/source.mk @@ -0,0 +1 @@ +SIMPLE += structs diff --git a/tests/structs.ek b/tests/structs/structs.ek index 13399b3..13399b3 100644 --- a/tests/structs.ek +++ b/tests/structs/structs.ek diff --git a/tests/trait_expand/source.mk b/tests/trait_expand/source.mk new file mode 100644 index 0000000..7926a7c --- /dev/null +++ b/tests/trait_expand/source.mk @@ -0,0 +1 @@ +SIMPLE += trait_expand diff --git a/tests/trait_expand.ek b/tests/trait_expand/trait_expand.ek index c5f0f1c..c5f0f1c 100644 --- a/tests/trait_expand.ek +++ b/tests/trait_expand/trait_expand.ek diff --git a/tests/trait_multiple_expand/source.mk b/tests/trait_multiple_expand/source.mk new file mode 100644 index 0000000..f4e9516 --- /dev/null +++ b/tests/trait_multiple_expand/source.mk @@ -0,0 +1 @@ +SIMPLE += trait_multiple_expand diff --git a/tests/trait_multiple_expand.ek b/tests/trait_multiple_expand/trait_multiple_expand.ek index 04e2b82..04e2b82 100644 --- a/tests/trait_multiple_expand.ek +++ b/tests/trait_multiple_expand/trait_multiple_expand.ek diff --git a/tests/trait_recursive_expand/source.mk b/tests/trait_recursive_expand/source.mk new file mode 100644 index 0000000..668408c --- /dev/null +++ b/tests/trait_recursive_expand/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += trait_recursive_expand,'recursive trait implementations not allowed' diff --git a/tests/trait_recursive_expand.ek b/tests/trait_recursive_expand/trait_recursive_expand.ek index 53012bf..53012bf 100644 --- a/tests/trait_recursive_expand.ek +++ b/tests/trait_recursive_expand/trait_recursive_expand.ek diff --git a/tests/ufcs/source.mk b/tests/ufcs/source.mk new file mode 100644 index 0000000..12e216d --- /dev/null +++ b/tests/ufcs/source.mk @@ -0,0 +1 @@ +SIMPLE += ufcs diff --git a/tests/ufcs.ek b/tests/ufcs/ufcs.ek index efa7701..efa7701 100644 --- a/tests/ufcs.ek +++ b/tests/ufcs/ufcs.ek diff --git a/tests/variadic/source.mk b/tests/variadic/source.mk new file mode 100644 index 0000000..e7c2972 --- /dev/null +++ b/tests/variadic/source.mk @@ -0,0 +1 @@ +SIMPLE_XFAIL += variadic,'not yet implemented' diff --git a/tests/variadic.ek b/tests/variadic/variadic.ek index 0e9120c..0e9120c 100644 --- a/tests/variadic.ek +++ b/tests/variadic/variadic.ek diff --git a/tests/vars.ek b/tests/vars.ek deleted file mode 100644 index ad56213..0000000 --- a/tests/vars.ek +++ /dev/null @@ -1,33 +0,0 @@ -typedef any {} - -struct some_struct { - i64 a; -} - -struct some_template (any A) { - A a; -} - -main() -{ - i64 a = 20; - a = 200; - - some_struct b = {.a = 20}; - b = {.a = 200}; - - mut c = {.a = 20} as some_struct; - c = {.a = 200}; - - mut some_template d = {.a = 20}; - d = {.a = 200}; - - mut some_template![i64] e = {.a = 20}; - e = {.a = 200}; - - mut f = {.a = 20} as some_template; - f = {.a = 200}; - - mut g = {.a = 20} as some_template(i64); - g = {.a = 200}; -} |
