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(count
, 1, "if true")
32 assertequal(count
, 0, "if false")
38 assertequal(count
, 1, "if true one")
45 assertequal(count
, 0, "if false one")
51 assertequal(count
, 1, "if empty")
57 assertequal(count
, 1, "if empty one")
63 assertequal(count
, 1, "if cond")
70 assertequal(count
, 1, "if else true")
77 assertequal(count
, -1, "if else false")
87 assertequal(count
, -1, "if else false var")
98 assertequal(count
, -1, "if else false var outside")