diff options
author | Russ Cox <rsc@golang.org> | 2009-03-03 08:39:12 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-03-03 08:39:12 -0800 |
commit | be2edb57614dd5a92294b7d29a34de754998fde5 (patch) | |
tree | 028f4f1a5f6b78795c1a1ef840b49c7da342edd1 /test/map.go | |
parent | e8b43190bbec4b3b445739c216a0f4e023a9442f (diff) | |
download | go-be2edb57614dd5a92294b7d29a34de754998fde5.tar.gz go-be2edb57614dd5a92294b7d29a34de754998fde5.zip |
Automated g4 rollback of changelist 25024,
plus significant hand editing.
Back to T{x} for composite literals.
R=r
OCL=25612
CL=25632
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 f0b7b9b00b..085502bf52 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 { |