summaryrefslogtreecommitdiff
path: root/usr/austin/eval/stmt_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-09-03 17:22:20 -0700
committerRuss Cox <rsc@golang.org>2009-09-03 17:22:20 -0700
commit27c99821e46ddea25e25514efcaa4f1cce8c5994 (patch)
tree273ce4674b4ab0a210ca82f5d042719c3c9df299 /usr/austin/eval/stmt_test.go
parentb62dede7477f50dd1fca4b7e73054ebe26290633 (diff)
downloadgolang-27c99821e46ddea25e25514efcaa4f1cce8c5994.tar.gz
top-level func
R=austin DELTA=21 (5 added, 10 deleted, 6 changed) OCL=34355 CL=34355
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) {