1 // run 2 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. 6 7 // Test integer literal syntax. 8 9 package main 10 11 import "os" 12 13 func main() { 14 s := 0 + 15 123 + 16 0123 + 17 0000 + 18 0x0 + 19 0x123 + 20 0X0 + 21 0X123 22 if s != 788 { 23 print("s is ", s, "; should be 788\n") 24 os.Exit(1) 25 } 26 } 27