From 7dbaa330e23648be41f3bea296306d9236ac3479 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 13 May 2022 16:37:56 +0200 Subject: [PATCH] :art: test chuck_rewrite --- tests/chuck_rewrite/chuck_rewrite.gw | 12 ++++++++++++ tests/chuck_rewrite/chuck_rewrite_error.gw | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/chuck_rewrite/chuck_rewrite.gw create mode 100644 tests/chuck_rewrite/chuck_rewrite_error.gw 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 >>>; -- 2.43.0