From: fennecdjay Date: Sun, 25 Feb 2024 17:54:13 +0000 (+0100) Subject: :white_check_mark: update tests X-Git-Tag: nightly~59 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=41a1465e6b8b05608b546a6a78e1240aeabc98c6;p=gwion.git :white_check_mark: update tests --- diff --git a/tests/array/array_ref_error.gw b/tests/array/array_ref_error.gw new file mode 100644 index 00000000..9af67463 --- /dev/null +++ b/tests/array/array_ref_error.gw @@ -0,0 +1,2 @@ +#! [contains] ref types as array base +var Array:[&void][12] i; diff --git a/tests/array/array_void_error.gw b/tests/array/array_void_error.gw new file mode 100644 index 00000000..50263ff1 --- /dev/null +++ b/tests/array/array_void_error.gw @@ -0,0 +1,2 @@ +#! [contains] type of size 0 as array base +var void[12] i; diff --git a/tests/error/return.gw b/tests/error/return.gw new file mode 100644 index 00000000..24356044 --- /dev/null +++ b/tests/error/return.gw @@ -0,0 +1,2 @@ +#! [contains] 'return' statement found outside function definition +class C { return;} diff --git a/tests/fptr/class_ptr2.gw b/tests/fptr/class_ptr2.gw index 278cde07..032eb86d 100644 --- a/tests/fptr/class_ptr2.gw +++ b/tests/fptr/class_ptr2.gw @@ -1,10 +1,10 @@ class C { fun void test(int i) { <<< "int arg" >>>; } - funptr void PtrType(int i); + funptr void PtrType(int); test :=> var static PtrType p; - p(1); + p(this, 1); test :=> p; - p(1); + p(this,1); } var C c;