blob: 32173f50d932da27d0a0e5462b6c904cf01d4a04 [file] [log] [blame]
Peter Collingbournead9841e2014-11-27 00:06:42 +00001// RUN: llgo -o %t %s
2// RUN: %t 2>&1 | FileCheck %s
3
4// CHECK: false
5// CHECK-NEXT: 2
6// CHECK-NEXT: 1 0 3
7// CHECK-NEXT: 0.1
8// CHECK-NEXT: 0.2
9// CHECK-NEXT: 0.3
10
11package main
12
13func main() {
14 type IntMap map[int]int
15 m := IntMap{0: 1, 2: 3}
16 println(m == nil)
17 println(len(m))
18 println(m[0], m[1], m[2])
19
20 f32tostr := map[float32]string{0.1: "0.1", 0.2: "0.2", 0.3: "0.3"}
21 println(f32tostr[0.1])
22 println(f32tostr[0.2])
23 println(f32tostr[0.3])
24}