summaryrefslogtreecommitdiff
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
commit2897f94b95d5abccd3de6d5c189186beb979400b (patch)
tree215ba82d2713550ef0ead44a627dd78579275bfa /test/const.go
parentb1d23c9a15da584630ca6c923cd863cab779ed48 (diff)
downloadgo-2897f94b95d5abccd3de6d5c189186beb979400b.tar.gz
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 85c0a91b6..8e587cfe5 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");
}