]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: add tests
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 24 Nov 2019 23:01:40 +0000 (00:01 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 24 Nov 2019 23:01:40 +0000 (00:01 +0100)
tests/pp/pragma.gw [moved from benchmark/fib-recurs.gw with 60% similarity]

similarity index 60%
rename from benchmark/fib-recurs.gw
rename to tests/pp/pragma.gw
index be2c4ab7162d604f16b198791a707eb18f305937..62061c0580b5f57e1415ef949f1f50c9225fae9a 100644 (file)
@@ -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 >>>;