2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / go.test / test / rune.go
blobc013c471d32d63396229af080a63981e60c4beb5
1 // compile
3 // Copyright 2011 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.
7 // Test rune constants, expressions and types.
8 // Compiles but does not run.
10 package rune
12 var (
13 r0 = 'a'
14 r1 = 'a'+1
15 r2 = 1+'a'
16 r3 = 'a'*2
17 r4 = 'a'/2
18 r5 = 'a'<<1
19 r6 = 'b'<<2
20 r7 int32
22 r = []rune{r0, r1, r2, r3, r4, r5, r6, r7}
25 var (
26 f0 = 1.2
27 f1 = 1.2/'a'
29 f = []float64{f0, f1}
32 var (
33 i0 = 1
34 i1 = 1<<'\x01'
36 i = []int{i0, i1}
39 const (
40 maxRune = '\U0010FFFF'
43 var (
44 b0 = maxRune < r0
46 b = []bool{b0}