]> Nishi Git Mirror - gwion.git/commitdiff
:art: test chuck_rewrite
authorJérémie Astor <fennecdjay@gmail.com>
Fri, 13 May 2022 14:37:56 +0000 (16:37 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Fri, 13 May 2022 14:37:56 +0000 (16:37 +0200)
tests/chuck_rewrite/chuck_rewrite.gw [new file with mode: 0644]
tests/chuck_rewrite/chuck_rewrite_error.gw [new file with mode: 0644]

diff --git a/tests/chuck_rewrite/chuck_rewrite.gw b/tests/chuck_rewrite/chuck_rewrite.gw
new file mode 100644 (file)
index 0000000..de8da99
--- /dev/null
@@ -0,0 +1,12 @@
+#! [contains] 42
+2 => var int i;
+
+fun int test() {
+  return i;
+}
+
+fun int test(int tmp) {
+  return tmp => i;
+}
+
+<<< 40 +=> test >>>;
diff --git a/tests/chuck_rewrite/chuck_rewrite_error.gw b/tests/chuck_rewrite/chuck_rewrite_error.gw
new file mode 100644 (file)
index 0000000..4df0fe1
--- /dev/null
@@ -0,0 +1,12 @@
+#! [contains] during rewriting operation
+2 => var int i;
+
+fun int test() {
+  return i;
+}
+
+fun int test(int tmp) {
+  return tmp => i;
+}
+
+<<< me +=> test >>>;