Source file
test/fixedbugs/issue18808.go
1
2
3
4
5
6
7 package main
8
9 const lim = 0x80000000
10
11
12 func eq(x uint32) {
13 if x == lim {
14 return
15 }
16 panic("x == lim returned false")
17 }
18
19
20 func neq(x uint32) {
21 if x != lim {
22 panic("x != lim returned true")
23 }
24 }
25
26
27 func gt(x uint32) {
28 if x > lim {
29 return
30 }
31 panic("x > lim returned false")
32 }
33
34
35 func gte(x uint32) {
36 if x >= lim {
37 return
38 }
39 panic("x >= lim returned false")
40 }
41
42
43 func lt(x uint32) {
44 if x < lim {
45 panic("x < lim returned true")
46 }
47 }
48
49
50 func lte(x uint32) {
51 if x <= lim {
52 panic("x <= lim returned true")
53 }
54 }
55
56 func main() {
57 eq(lim)
58 neq(lim)
59 gt(lim+1)
60 gte(lim+1)
61 lt(lim+1)
62 lte(lim+1)
63 }
64
View as plain text