]> Cypherpunks.ru repositories - gostls13.git/blob - test/char_lit.go
test: remove semiocolons.
[gostls13.git] / test / char_lit.go
1 // $G $F.go && $L $F.$A &&./$A.out
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 package main
8
9 import "os"
10
11 func main() {
12         var i uint64 =
13                 ' ' +
14                 'a' +
15                 'ä' +
16                 '本' +
17                 '\a' +
18                 '\b' +
19                 '\f' +
20                 '\n' +
21                 '\r' +
22                 '\t' +
23                 '\v' +
24                 '\\' +
25                 '\'' +
26                 '\000' +
27                 '\123' +
28                 '\x00' +
29                 '\xca' +
30                 '\xFE' +
31                 '\u0123' +
32                 '\ubabe' +
33                 '\U0010FFFF' +
34                 '\U000ebabe'
35         if '\U000ebabe' != 0x000ebabe {
36                 print("ebabe wrong\n")
37                 os.Exit(1)
38         }
39         if i != 0x20e213 {
40                 print("number is ", i, " should be ", 0x20e213, "\n")
41                 os.Exit(1)
42         }
43 }