summaryrefslogtreecommitdiff
path: root/test/int_lit.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-06-08 17:19:11 -0700
committerRob Pike <r@golang.org>2008-06-08 17:19:11 -0700
commitc72fe6d80461e87044e683e4fc60b2fa9305956b (patch)
tree1943a54acde02ebd5ed3f28f8a028501f9994954 /test/int_lit.go
parentb16d2bc4cb3b72c5feabb2293b89137b4cdc1f51 (diff)
downloadgo-c72fe6d80461e87044e683e4fc60b2fa9305956b.tar.gz
Fix a few tests
SVN=121614
Diffstat (limited to 'test/int_lit.go')
-rw-r--r--test/int_lit.go25
1 files changed, 14 insertions, 11 deletions
diff --git a/test/int_lit.go b/test/int_lit.go
index 9ce5fa317..28c83d965 100644
--- a/test/int_lit.go
+++ b/test/int_lit.go
@@ -6,15 +6,18 @@
package main
-func main() {
- []int(
- 0,
- 123,
- 0123,
- 0000,
- 0x0,
- 0x123,
- 0X0,
- 0X123
- );
+func main() int {
+ s :=
+ 0 +
+ 123 +
+ 0123 +
+ 0000 +
+ 0x0 +
+ 0x123 +
+ 0X0 +
+ 0X123;
+ if s != 788 {
+ print "s is ", s, "; should be 788\n";
+ return 1;
+ }
}