From 25d5e31404d25f7e143eb753e6e67bb7eb68f8f1 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 25 Nov 2019 00:01:40 +0100 Subject: [PATCH] :white_check_mark: add tests --- benchmark/fib-recurs.gw => tests/pp/pragma.gw | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename benchmark/fib-recurs.gw => tests/pp/pragma.gw (60%) 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 >>>; -- 2.43.0