blob: 78deaea13020557993bbec27e6547c67428bb418 [file] [log] [blame]
Colin Cross7bb052a2015-02-03 12:59:37 -08001// 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
9package main
10
11import "os"
12
13func 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}