]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Add more tests)
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 18:03:00 +0000 (20:03 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 18:03:00 +0000 (20:03 +0200)
tests/error/invalid_array_shift.gw [new file with mode: 0644]
tests/tree/extent_template.gw [new file with mode: 0644]
tests/tree/pushStaticCode.gw [new file with mode: 0644]
tests/tree/undefined.gw [new file with mode: 0644]

diff --git a/tests/error/invalid_array_shift.gw b/tests/error/invalid_array_shift.gw
new file mode 100644 (file)
index 0000000..b365f6c
--- /dev/null
@@ -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 (file)
index 0000000..b805b09
--- /dev/null
@@ -0,0 +1,7 @@
+class <~A~> C {
+  A a;
+}
+
+class D extends <~int~>C {}
+D d;
+<<<d.a>>>;
diff --git a/tests/tree/pushStaticCode.gw b/tests/tree/pushStaticCode.gw
new file mode 100644 (file)
index 0000000..5e88327
--- /dev/null
@@ -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 (file)
index 0000000..64821e3
--- /dev/null
@@ -0,0 +1,2 @@
+
+`typeof(1)` i;