]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: update tests
authorfennecdjay <fennecdjay@gmail.com>
Sun, 25 Feb 2024 17:54:13 +0000 (18:54 +0100)
committerfennecdjay <fennecdjay@gmail.com>
Sun, 25 Feb 2024 17:54:13 +0000 (18:54 +0100)
tests/array/array_ref_error.gw [new file with mode: 0644]
tests/array/array_void_error.gw [new file with mode: 0644]
tests/error/return.gw [new file with mode: 0644]
tests/fptr/class_ptr2.gw

diff --git a/tests/array/array_ref_error.gw b/tests/array/array_ref_error.gw
new file mode 100644 (file)
index 0000000..9af6746
--- /dev/null
@@ -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 (file)
index 0000000..50263ff
--- /dev/null
@@ -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 (file)
index 0000000..2435604
--- /dev/null
@@ -0,0 +1,2 @@
+#! [contains] 'return' statement found outside function definition
+class C { return;}
index 278cde077828926bd05ece623a1b32ed8684e130..032eb86de9a3838079697a110900f949277a109a 100644 (file)
@@ -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;