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.
9 func assertequal(is, shouldbe int, msg string) {
11 print("assertion fail", msg, "\n")
26 assertequal(i, 6, "break")
29 for i := 0; i <= 10; i++ {
32 assertequal(sum, 55, "all three")
35 for i := 0; i <= 10; {
39 assertequal(sum, 55, "only two")
45 assertequal(sum, 99 + 9, "only one")
48 for i := 0; i <= 10; i++ {
54 assertequal(sum, 1+3+5+7+9, "continue")