]> Cypherpunks.ru repositories - gostls13.git/blob - test/initcomma.go
change *map to map; *chan to chan; new(T) to new(*T)
[gostls13.git] / test / initcomma.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 var a = []int { 1, 2, }
10 var b = []int { }
11 var c = []int { 1 }
12
13 func main() {
14         if len(a) != 2 { panicln("len a", len(a)) }
15         if len(b) != 5 { panicln("len b", len(b)) }
16         if len(c) != 1 { panicln("len a", len(a)) }
17 }