aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/fmt/fmt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/fmt/fmt_test.go')
-rw-r--r--src/pkg/fmt/fmt_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/fmt/fmt_test.go b/src/pkg/fmt/fmt_test.go
index 122b9516ba..1f059d4c97 100644
--- a/src/pkg/fmt/fmt_test.go
+++ b/src/pkg/fmt/fmt_test.go
@@ -62,7 +62,7 @@ type I int
func (i I) String() string { return Sprintf("<%d>", int(i)) }
type B struct {
- i I
+ I I
j int
}
@@ -84,8 +84,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
@@ -322,8 +322,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>`},
@@ -339,7 +339,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
@@ -374,11 +374,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"},