From: Jérémie Astor Date: Fri, 13 May 2022 14:37:56 +0000 (+0200) Subject: :art: test chuck_rewrite X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7dbaa330e23648be41f3bea296306d9236ac3479;p=gwion.git :art: test chuck_rewrite --- diff --git a/tests/chuck_rewrite/chuck_rewrite.gw b/tests/chuck_rewrite/chuck_rewrite.gw new file mode 100644 index 00000000..de8da997 --- /dev/null +++ b/tests/chuck_rewrite/chuck_rewrite.gw @@ -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 index 00000000..4df0fe14 --- /dev/null +++ b/tests/chuck_rewrite/chuck_rewrite_error.gw @@ -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 >>>;