]> Cypherpunks repositories - gostls13.git/commitdiff
go/ast: use single-element map in test
authorRobert Griesemer <gri@golang.org>
Thu, 20 Oct 2011 19:37:13 +0000 (12:37 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 20 Oct 2011 19:37:13 +0000 (12:37 -0700)
Avoids test failure due to undefined map iteration order.

R=rsc, iant, iant
CC=golang-dev
https://golang.org/cl/5297048

src/pkg/go/ast/print_test.go

index a4bc3bb9dcdbb33f3580a88aa19819743cc93015..c3153ed6f725abfc96c19b806962e43b0eb1ccf4 100644 (file)
@@ -23,11 +23,10 @@ var tests = []struct {
        {"foobar", "0  \"foobar\""},
 
        // maps
-       {map[string]int{"a": 1, "b": 2},
-               `0  map[string] int (len = 2) {
+       {map[string]int{"a": 1},
+               `0  map[string] int (len = 1) {
                1  .  "a": 1
-               2  .  "b": 2
-               3  }`},
+               2  }`},
 
        // pointers
        {new(int), "0  *0"},