aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-02-28 11:33:08 -0800
committerRob Pike <r@golang.org>2013-02-28 11:33:08 -0800
commit1bf66f081fb34893235a02b29a8eb559e17c248e (patch)
tree146c3d68d8364e5a6290837b62051b403d6798ff /src/pkg
parent3dc7f17e892a5422ca9a21e1eb3187850c31cebb (diff)
downloadgo-1bf66f081fb34893235a02b29a8eb559e17c248e.tar.xz
all: fix a few more printf arg bugs found by go vet
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7413045
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/math/big/rat_test.go2
-rw-r--r--src/pkg/reflect/set_test.go6
-rw-r--r--src/pkg/strings/strings_test.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/math/big/rat_test.go b/src/pkg/math/big/rat_test.go
index b7456b1e2a..462dfb723d 100644
--- a/src/pkg/math/big/rat_test.go
+++ b/src/pkg/math/big/rat_test.go
@@ -753,7 +753,7 @@ func TestFloat64SpecialCases(t *testing.T) {
// 4. Check exactness using slow algorithm.
if wasExact := new(Rat).SetFloat64(f).Cmp(r) == 0; wasExact != exact {
- t.Errorf("Rat.SetString(%q).Float64().exact = %b, want %b", input, exact, wasExact)
+ t.Errorf("Rat.SetString(%q).Float64().exact = %t, want %t", input, exact, wasExact)
}
}
}
diff --git a/src/pkg/reflect/set_test.go b/src/pkg/reflect/set_test.go
index 83b6507f1a..85dc55e681 100644
--- a/src/pkg/reflect/set_test.go
+++ b/src/pkg/reflect/set_test.go
@@ -81,7 +81,7 @@ func TestImplicitMapConversion(t *testing.T) {
t.Errorf("#5 after SetMapIndex(b1, b2): %p (!= %p), %t (map=%v)", x, b2, ok, m)
}
if p := mv.MapIndex(ValueOf(b1)).Elem().Pointer(); p != uintptr(unsafe.Pointer(b2)) {
- t.Errorf("#5 MapIndex(b1) = %p want %p", p, b2)
+ t.Errorf("#5 MapIndex(b1) = %#x want %p", p, b2)
}
}
{
@@ -96,7 +96,7 @@ func TestImplicitMapConversion(t *testing.T) {
t.Errorf("#6 after SetMapIndex(c1, c2): %p (!= %p), %t (map=%v)", x, c2, ok, m)
}
if p := mv.MapIndex(ValueOf(c1)).Pointer(); p != ValueOf(c2).Pointer() {
- t.Errorf("#6 MapIndex(c1) = %p want %p", p, c2)
+ t.Errorf("#6 MapIndex(c1) = %#x want %p", p, c2)
}
}
{
@@ -115,7 +115,7 @@ func TestImplicitMapConversion(t *testing.T) {
t.Errorf("#7 after SetMapIndex(b1, b2): %p (!= %p), %t (map=%v)", x, b2, ok, m)
}
if p := mv.MapIndex(ValueOf(b1)).Pointer(); p != uintptr(unsafe.Pointer(b2)) {
- t.Errorf("#7 MapIndex(b1) = %p want %p", p, b2)
+ t.Errorf("#7 MapIndex(b1) = %#x want %p", p, b2)
}
}
diff --git a/src/pkg/strings/strings_test.go b/src/pkg/strings/strings_test.go
index 2db9e3d1f3..09de49e5fb 100644
--- a/src/pkg/strings/strings_test.go
+++ b/src/pkg/strings/strings_test.go
@@ -967,7 +967,7 @@ var ContainsRuneTests = []struct {
func TestContainsRune(t *testing.T) {
for _, ct := range ContainsRuneTests {
if ContainsRune(ct.str, ct.r) != ct.expected {
- t.Errorf("ContainsRune(%s, %s) = %v, want %v",
+ t.Errorf("ContainsRune(%q, %q) = %v, want %v",
ct.str, ct.r, !ct.expected, ct.expected)
}
}