diff options
author | Russ Cox <rsc@golang.org> | 2009-02-13 14:48:32 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-02-13 14:48:32 -0800 |
commit | 9f8f2e6130d7899b0f689232d173ea2e4441285c (patch) | |
tree | a3b6c6ab9f68981976738f0efc7988353d5a0d82 /test/map.go | |
parent | 07244f7c8081669f33433385a1f81e2a8d8cb55d (diff) | |
download | go-9f8f2e6130d7899b0f689232d173ea2e4441285c.tar.gz go-9f8f2e6130d7899b0f689232d173ea2e4441285c.zip |
convert composite literals from { } to ( ).
only non-trivial changes are in
convlit1.go
golden.out
R=gri
OCL=25019
CL=25024
Diffstat (limited to 'test/map.go')
-rw-r--r-- | test/map.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/map.go b/test/map.go index 085502bf52..f0b7b9b00b 100644 --- a/test/map.go +++ b/test/map.go @@ -27,9 +27,9 @@ func P(a []string) string { func main() { // Test a map literal. - mlit := map[string] int { "0":0, "1":1, "2":2, "3":3, "4":4 }; + mlit := map[string] int ( "0":0, "1":1, "2":2, "3":3, "4":4 ); for i := 0; i < len(mlit); i++ { - s := string([]byte{byte(i)+'0'}); + s := string([]byte(byte(i)+'0')); if mlit[s] != i { fmt.Printf("mlit[%s] = %d\n", s, mlit[s]) } @@ -64,14 +64,14 @@ func main() { s := strconv.Itoa(i); s10 := strconv.Itoa(i*10); f := float(i); - t := T{int64(i),f}; + t := T(int64(i),f); apT[i] = new(T); apT[i].i = int64(i); apT[i].f = f; apT[2*i] = new(T); // need twice as many entries as we use, for the nonexistence check apT[2*i].i = int64(i); apT[2*i].f = f; - m := M{i: i+1}; + m := M(i: i+1); mib[i] = (i != 0); mii[i] = 10*i; mfi[float(i)] = 10*i; @@ -140,7 +140,7 @@ func main() { s := strconv.Itoa(i); s10 := strconv.Itoa(i*10); f := float(i); - t := T{int64(i), f}; + t := T(int64(i), f); // BUG m := M(i, i+1); if mib[i] != (i != 0) { fmt.Printf("mib[%d] = %t\n", i, mib[i]); @@ -193,7 +193,7 @@ func main() { for i := 0; i < count; i++ { s := strconv.Itoa(i); f := float(i); - t := T{int64(i), f}; + t := T(int64(i), f); { a, b := mib[i]; if !b { @@ -331,7 +331,7 @@ func main() { for i := count; i < 2*count; i++ { s := strconv.Itoa(i); f := float(i); - t := T{int64(i),f}; + t := T(int64(i),f); { a, b := mib[i]; if b { |