OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [char_lit.go] - Blame information for rev 700

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.