From 36dc8c4ba65f8676730d45ed4fd5959562a69e9f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 7 Jul 2019 20:03:00 +0200 Subject: [PATCH] :white_check_mark: Add more tests) --- tests/error/invalid_array_shift.gw | 3 +++ tests/tree/extent_template.gw | 7 +++++++ tests/tree/pushStaticCode.gw | 8 ++++++++ tests/tree/undefined.gw | 2 ++ 4 files changed, 20 insertions(+) create mode 100644 tests/error/invalid_array_shift.gw create mode 100644 tests/tree/extent_template.gw create mode 100644 tests/tree/pushStaticCode.gw create mode 100644 tests/tree/undefined.gw diff --git a/tests/error/invalid_array_shift.gw b/tests/error/invalid_array_shift.gw new file mode 100644 index 00000000..b365f6cf --- /dev/null +++ b/tests/error/invalid_array_shift.gw @@ -0,0 +1,3 @@ +#! [contains] array types do not match +int i[2]; +i << 2.3; diff --git a/tests/tree/extent_template.gw b/tests/tree/extent_template.gw new file mode 100644 index 00000000..b805b09a --- /dev/null +++ b/tests/tree/extent_template.gw @@ -0,0 +1,7 @@ +class <~A~> C { + A a; +} + +class D extends <~int~>C {} +D d; +<<>>; diff --git a/tests/tree/pushStaticCode.gw b/tests/tree/pushStaticCode.gw new file mode 100644 index 00000000..5e88327a --- /dev/null +++ b/tests/tree/pushStaticCode.gw @@ -0,0 +1,8 @@ +class C { + fun static void test(int i) { + if(i) + i - 1 => test; + } +} + +C.test(3); diff --git a/tests/tree/undefined.gw b/tests/tree/undefined.gw new file mode 100644 index 00000000..64821e36 --- /dev/null +++ b/tests/tree/undefined.gw @@ -0,0 +1,2 @@ + +`typeof(1)` i; -- 2.43.0