diff options
author | Rob Pike <r@golang.org> | 2010-06-14 17:42:31 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2010-06-14 17:42:31 -0700 |
commit | cdc700c29a00bc78660cc6725ec9b4ef621c39a1 (patch) | |
tree | 960f1edf6da92537b5498c84d87761f907227f13 /src/pkg/fmt/fmt_test.go | |
parent | dcabff01961349b411c3f17f7afb82255578ca30 (diff) | |
download | golang-cdc700c29a00bc78660cc6725ec9b4ef621c39a1.tar.gz |
fmt.Printf: write tests for %T.
Fix a bug that caused it to ignore field widths.
R=rsc
CC=golang-dev
http://codereview.appspot.com/1704041
Diffstat (limited to 'src/pkg/fmt/fmt_test.go')
-rw-r--r-- | src/pkg/fmt/fmt_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/fmt/fmt_test.go b/src/pkg/fmt/fmt_test.go index d9bb167dd..e48e874b1 100644 --- a/src/pkg/fmt/fmt_test.go +++ b/src/pkg/fmt/fmt_test.go @@ -314,6 +314,12 @@ var fmttests = []fmtTest{ fmtTest{"%v", renamedComplex64(3 + 4i), "(3+4i)"}, fmtTest{"%v", renamedComplex128(4 - 3i), "(4-3i)"}, + // %T + fmtTest{"%T", (4 - 3i), "complex"}, + fmtTest{"%T", renamedComplex128(4 - 3i), "fmt_test.renamedComplex128"}, + fmtTest{"%T", intVal, "int"}, + fmtTest{"%6T", &intVal, " *int"}, + // erroneous things fmtTest{"%d", "hello", "%d(string=hello)"}, fmtTest{"no args", "hello", "no args?(extra string=hello)"}, |