1 // $G $F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
13 func addInt(i int) { result += fmt.Sprint(i) }
16 for i := 0; i < 10; i++ {
24 if result != "9876543210" {
25 fmt.Printf("test1: bad defer result (should be 9876543210): %q\n", result)
29 func addDotDotDot(v ...interface{}) { result += fmt.Sprint(v...) }
32 for i := 0; i < 10; i++ {
40 if result != "9876543210" {
41 fmt.Printf("test2: bad defer result (should be 9876543210): %q\n", result)