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.
11 func assert(cond bool, msg string) {
13 print("assertion fail: ", msg, "\n")
23 g float32 = 4.5 * float32(iota)
50 i = (a << iota) + (b * iota)
68 s = string(iota + 'a')
73 abit, amask = 1 << iota, 1<<iota - 1
74 bbit, bmask = 1 << iota, 1<<iota - 1
75 cbit, cmask = 1 << iota, 1<<iota - 1
83 assert(g == 18.0, "g")
109 assert(p == 0.0, "p")
110 assert(q == 1.0, "q")
111 assert(r == 2.0, "r")
113 assert(s == "a", "s")
114 assert(t == "b", "t")
116 assert(abit == 1, "abit")
117 assert(amask == 0, "amask")
118 assert(bbit == 2, "bbit")
119 assert(bmask == 1, "bmask")
120 assert(cbit == 4, "cbit")
121 assert(cmask == 3, "cmask")