| // $G $F.go && $L $F.$A && ./$A.out |
| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func assertequal(is, shouldbe int, msg string) { |
| print("assertion fail", msg, "\n"); |
| assertequal(i, 6, "break"); |
| for i := 0; i <= 10; i++ { |
| assertequal(sum, 55, "all three"); |
| assertequal(sum, 55, "only two"); |
| assertequal(sum, 99 + 9, "only one"); |
| for i := 0; i <= 10; i++ { |
| assertequal(sum, 1+3+5+7+9, "continue"); |