From b17df7cb40459b449bcd7f81cf29f57a65c04efb Mon Sep 17 00:00:00 2001 From: VegOwOtenks Date: Tue, 8 Oct 2024 22:48:46 +0200 Subject: [PATCH] Interpreter input files for testing --- test-inputs/efficient-fibonacci.flup | 9 +++++++++ test-inputs/fibonacci.flup | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 test-inputs/efficient-fibonacci.flup create mode 100644 test-inputs/fibonacci.flup diff --git a/test-inputs/efficient-fibonacci.flup b/test-inputs/efficient-fibonacci.flup new file mode 100644 index 0000000..9ff7b63 --- /dev/null +++ b/test-inputs/efficient-fibonacci.flup @@ -0,0 +1,9 @@ +fib: int n -> int + | 1 -> fib: int a int b int iterations -> int + | iterations 0 == -> a b + + | 1 -> a b + println b a b + iterations 1 - fib + ; + 1 1 n fib + ; + +50 fib println diff --git a/test-inputs/fibonacci.flup b/test-inputs/fibonacci.flup new file mode 100644 index 0000000..eb742d0 --- /dev/null +++ b/test-inputs/fibonacci.flup @@ -0,0 +1,7 @@ +fib: int a -> int + | a 0 == -> 1 + | a 1 == -> 1 + | 1 1 == -> a 1 - fib a 2 - fib + duplicate println + ; + +10 fib \ No newline at end of file