From: fennecdjay Date: Sun, 24 Nov 2019 23:01:40 +0000 (+0100) Subject: :white_check_mark: add tests X-Git-Tag: nightly~2086 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=25d5e31404d25f7e143eb753e6e67bb7eb68f8f1;p=gwion.git :white_check_mark: add tests --- diff --git a/benchmark/fib-recurs.gw b/tests/pp/pragma.gw similarity index 60% rename from benchmark/fib-recurs.gw rename to tests/pp/pragma.gw index be2c4ab7..62061c05 100644 --- a/benchmark/fib-recurs.gw +++ b/tests/pp/pragma.gw @@ -1,8 +1,11 @@ +#pragma memoize 3 fun int recursive_fib(int n) { if (n < 2) return n; else return recursive_fib(n - 2) + recursive_fib(n - 1); } -#!<<< 5 => recursive_fib >>>; +<<< 1 => recursive_fib >>>; +<<< 1 => recursive_fib >>>; +#!<<< 12 => recursive_fib >>>; <<< 40 => recursive_fib >>>;