]> Cypherpunks.ru repositories - gostls13.git/blob - test/rename.go
test/[n-r]*.go: add documentation
[gostls13.git] / test / rename.go
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 that predeclared names can be redeclared by the user.
8
9 package main
10
11 import "fmt"
12
13 func main() {
14         n :=
15                 append +
16                         bool +
17                         byte +
18                         complex +
19                         complex64 +
20                         complex128 +
21                         cap +
22                         close +
23                         delete +
24                         error +
25                         false +
26                         float32 +
27                         float64 +
28                         imag +
29                         int +
30                         int8 +
31                         int16 +
32                         int32 +
33                         int64 +
34                         len +
35                         make +
36                         new +
37                         nil +
38                         panic +
39                         print +
40                         println +
41                         real +
42                         recover +
43                         rune +
44                         string +
45                         true +
46                         uint +
47                         uint8 +
48                         uint16 +
49                         uint32 +
50                         uint64 +
51                         uintptr +
52                         iota
53         if n != NUM*(NUM-1)/2 {
54                 fmt.Println("BUG: wrong n", n, NUM*(NUM-1)/2)
55         }
56 }
57
58 const (
59         append = iota
60         bool
61         byte
62         complex
63         complex64
64         complex128
65         cap
66         close
67         delete
68         error
69         false
70         float32
71         float64
72         imag
73         int
74         int8
75         int16
76         int32
77         int64
78         len
79         make
80         new
81         nil
82         panic
83         print
84         println
85         real
86         recover
87         rune
88         string
89         true
90         uint
91         uint8
92         uint16
93         uint32
94         uint64
95         uintptr
96         NUM
97         iota = 0
98 )