summaryrefslogtreecommitdiff
path: root/usr/austin/eval/stmt_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-11 02:35:53 -0700
committerRuss Cox <rsc@golang.org>2009-10-11 02:35:53 -0700
commit81355af7a117fb5e2ea9293fc571a5e5ec1f46fe (patch)
tree9fb3f570f0c3533494624200fd6a8fb871931d8c /usr/austin/eval/stmt_test.go
parent109a270f65b3de37aba729a3a558fe2d64484ce1 (diff)
downloadgolang-81355af7a117fb5e2ea9293fc571a5e5ec1f46fe.tar.gz
interpreter checkpoint.
* generate different versions of binary operators for each size of int and float, so that proper truncating happens after each operation to simulate the various sized ops. * add slice expressions * publish World.CompileStmtList, CompileDeclList, CompileExpr * handle type-less expressions in CompileExpr R=austin DELTA=1459 (1327 added, 11 deleted, 121 changed) OCL=34382 CL=35581
Diffstat (limited to 'usr/austin/eval/stmt_test.go')
-rw-r--r--usr/austin/eval/stmt_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/austin/eval/stmt_test.go b/usr/austin/eval/stmt_test.go
index 77e907088..e94adfb60 100644
--- a/usr/austin/eval/stmt_test.go
+++ b/usr/austin/eval/stmt_test.go
@@ -331,9 +331,11 @@ 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),
+ Run("func f1(){}"),
+ Run2("func f1(){}", "f1()"),
}
func TestStmt(t *testing.T) {