From: fennecdjay Date: Tue, 8 Oct 2019 11:49:37 +0000 (+0200) Subject: :white_check_mark: More tests X-Git-Tag: nightly~2198^2~103 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ece9ff7af5daa46728e1de9781fcd60b8416b48e;p=gwion.git :white_check_mark: More tests --- diff --git a/tests/error/func_alternative_void.gw b/tests/error/func_alternative_void.gw new file mode 100644 index 00000000..3047f4b3 --- /dev/null +++ b/tests/error/func_alternative_void.gw @@ -0,0 +1,3 @@ +#! [contains] void +fun void test(int i) {} +() => test; diff --git a/tests/error/missing_return_value.gw b/tests/error/missing_return_value.gw new file mode 100644 index 00000000..d1ce8cb8 --- /dev/null +++ b/tests/error/missing_return_value.gw @@ -0,0 +1,2 @@ +#! [contains] missing value for return +fun int test() { return; } diff --git a/tests/error/template_not_able.gw b/tests/error/template_not_able.gw new file mode 100644 index 00000000..2b804442 --- /dev/null +++ b/tests/error/template_not_able.gw @@ -0,0 +1,3 @@ +#! [contains] not able to guess types for template call +fun void test<~A,B~>(A a) {} +test(1); diff --git a/tests/error/varloop_only.gw b/tests/error/varloop_only.gw new file mode 100644 index 00000000..551f2318 --- /dev/null +++ b/tests/error/varloop_only.gw @@ -0,0 +1,5 @@ +#! [contains] Varloop must be the only expression +fun void test(...) { + <<<"test">>>, vararg.start; + vararg.end; +} diff --git a/tests/internal_op/cast_similar.gw b/tests/internal_op/cast_similar.gw new file mode 100644 index 00000000..19d4a1fd --- /dev/null +++ b/tests/internal_op/cast_similar.gw @@ -0,0 +1,3 @@ +typedef int INT; +INT i; +<<< i $ int >>>; diff --git a/tests/internal_op/implicit_similar.gw b/tests/internal_op/implicit_similar.gw new file mode 100644 index 00000000..1775c26b --- /dev/null +++ b/tests/internal_op/implicit_similar.gw @@ -0,0 +1,3 @@ +typedef int INT; +fun void test(INT i) { <<< i >>>; } +1 => test; diff --git a/tests/tree/typedef_auto_loop.gw b/tests/tree/typedef_auto_loop.gw new file mode 100644 index 00000000..cadca626 --- /dev/null +++ b/tests/tree/typedef_auto_loop.gw @@ -0,0 +1,3 @@ +typedef int[2] Type; +Type type; +for(auto a : type);