summaryrefslogtreecommitdiff
path: root/usr/austin/eval/stmt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'usr/austin/eval/stmt_test.go')
-rw-r--r--usr/austin/eval/stmt_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/austin/eval/stmt_test.go b/usr/austin/eval/stmt_test.go
index 0324a40f1..77e907088 100644
--- a/usr/austin/eval/stmt_test.go
+++ b/usr/austin/eval/stmt_test.go
@@ -331,6 +331,9 @@ var stmtTests = []test {
CErr("x := make(map[int] int); (func(a,b int){})(x[0])", "not enough"),
CErr("x := make(map[int] int); x[1] = oneTwo()", "too many"),
RErr("x := make(map[int] int); i = x[1]", "key '1' not found"),
+
+ // Functions
+ Val2("func fib(n int) int { if n <= 2 { return n } return fib(n-1) + fib(n-2) }", "fib(4)", 5, "fib(10)", 89),
}
func TestStmt(t *testing.T) {