aboutsummaryrefslogtreecommitdiff
path: root/test/const.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-03-12 19:04:38 -0700
committerRuss Cox <rsc@golang.org>2009-03-12 19:04:38 -0700
commit8f194bf5ff15e3f62ce02669bf48d54a6342260e (patch)
tree215ba82d2713550ef0ead44a627dd78579275bfa /test/const.go
parent9b5d82327b1498b74611d539f9812d3cce13cbc3 (diff)
downloadgo-8f194bf5ff15e3f62ce02669bf48d54a6342260e.tar.gz
go-8f194bf5ff15e3f62ce02669bf48d54a6342260e.zip
make 6g constants behave as ken proposes. (i hope.)
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
Diffstat (limited to 'test/const.go')
-rw-r--r--test/const.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/const.go b/test/const.go
index 85c0a91b60..8e587cfe55 100644
--- a/test/const.go
+++ b/test/const.go
@@ -14,6 +14,9 @@ const (
c1 = chuge >> 100;
c3div2 = 3/2;
c1e3 = 1e3;
+
+ ctrue = true;
+ cfalse = !ctrue;
)
const (
@@ -111,4 +114,7 @@ func floats() {
func main() {
ints();
floats();
+
+ assert(ctrue == true, "ctrue == true");
+ assert(cfalse == false, "cfalse == false");
}