diff options
Diffstat (limited to 'libgo/go/fmt/fmt_test.go')
-rw-r--r-- | libgo/go/fmt/fmt_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libgo/go/fmt/fmt_test.go b/libgo/go/fmt/fmt_test.go index 1142c9f8ad7..38218dfdc10 100644 --- a/libgo/go/fmt/fmt_test.go +++ b/libgo/go/fmt/fmt_test.go @@ -61,7 +61,7 @@ type I int func (i I) String() string { return Sprintf("<%d>", int(i)) } type B struct { - i I + I I j int } @@ -83,8 +83,8 @@ func (g G) GoString() string { } type S struct { - f F // a struct field that Formats - g G // a struct field that GoStrings + F F // a struct field that Formats + G G // a struct field that GoStrings } // A type with a String method with pointer receiver for testing %p @@ -332,8 +332,8 @@ var fmttests = []struct { {"%+v", A{1, 2, "a", []int{1, 2}}, `{i:1 j:2 s:a x:[1 2]}`}, // +v on structs with Stringable items - {"%+v", B{1, 2}, `{i:<1> j:2}`}, - {"%+v", C{1, B{2, 3}}, `{i:1 B:{i:<2> j:3}}`}, + {"%+v", B{1, 2}, `{I:<1> j:2}`}, + {"%+v", C{1, B{2, 3}}, `{i:1 B:{I:<2> j:3}}`}, // q on Stringable items {"%s", I(23), `<23>`}, @@ -349,7 +349,7 @@ var fmttests = []struct { {"%#v", uint64(1<<64 - 1), "0xffffffffffffffff"}, {"%#v", 1000000000, "1000000000"}, {"%#v", map[string]int{"a": 1, "b": 2}, `map[string] int{"a":1, "b":2}`}, - {"%#v", map[string]B{"a": {1, 2}, "b": {3, 4}}, `map[string] fmt_test.B{"a":fmt_test.B{i:1, j:2}, "b":fmt_test.B{i:3, j:4}}`}, + {"%#v", map[string]B{"a": {1, 2}, "b": {3, 4}}, `map[string] fmt_test.B{"a":fmt_test.B{I:1, j:2}, "b":fmt_test.B{I:3, j:4}}`}, {"%#v", []string{"a", "b"}, `[]string{"a", "b"}`}, // slices with other formats @@ -384,11 +384,11 @@ var fmttests = []struct { // Formatter {"%x", F(1), "<x=F(1)>"}, {"%x", G(2), "2"}, - {"%+v", S{F(4), G(5)}, "{f:<v=F(4)> g:5}"}, + {"%+v", S{F(4), G(5)}, "{F:<v=F(4)> G:5}"}, // GoStringer {"%#v", G(6), "GoString(6)"}, - {"%#v", S{F(7), G(8)}, "fmt_test.S{f:<v=F(7)>, g:GoString(8)}"}, + {"%#v", S{F(7), G(8)}, "fmt_test.S{F:<v=F(7)>, G:GoString(8)}"}, // %T {"%T", (4 - 3i), "complex128"}, |