]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix some printf format strings
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 13 Feb 2017 06:56:50 +0000 (22:56 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 14 Feb 2017 02:09:30 +0000 (02:09 +0000)
Appease vet.

Change-Id: Ie88de08b91041990c0eaf2e15628cdb98d40c660
Reviewed-on: https://go-review.googlesource.com/36938
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/internal/src/xpos_test.go
src/cmd/nm/nm_test.go
src/math/big/prime_test.go

index 274bd761cd031787339d709978c8ffb904ae0d9e..3f5b848b3c1bf5d4b2d34a5b790cbf9270e58d24 100644 (file)
@@ -59,9 +59,9 @@ func TestConversion(t *testing.T) {
 func TestSize(t *testing.T) {
        var p XPos
        if unsafe.Alignof(p) != 4 {
-               t.Errorf("alignment = %s; want 4", unsafe.Alignof(p))
+               t.Errorf("alignment = %v; want 4", unsafe.Alignof(p))
        }
        if unsafe.Sizeof(p) != 8 {
-               t.Errorf("size = %s; want 8", unsafe.Sizeof(p))
+               t.Errorf("size = %v; want 8", unsafe.Sizeof(p))
        }
 }
index d7a867a0fdaa3d5290909971c68d3f02ad26b5db..170d87a690102111ad9ccdc98108b3dec627e7aa 100644 (file)
@@ -34,7 +34,7 @@ func testMain(m *testing.M) int {
 
        tmpDir, err := ioutil.TempDir("", "TestNM")
        if err != nil {
-               fmt.Printf("TempDir failed: ", err)
+               fmt.Println("TempDir failed:", err)
                return 2
        }
        defer os.RemoveAll(tmpDir)
@@ -42,7 +42,7 @@ func testMain(m *testing.M) int {
        testnmpath = filepath.Join(tmpDir, "testnm.exe")
        gotool, err := testenv.GoTool()
        if err != nil {
-               fmt.Printf("GoTool failed: ", err)
+               fmt.Println("GoTool failed:", err)
                return 2
        }
        out, err := exec.Command(gotool, "build", "-o", testnmpath, "cmd/nm").CombinedOutput()
@@ -149,7 +149,7 @@ func testGoFile(t *testing.T, iscgo, isexternallinker bool) {
        }
        err = scanner.Err()
        if err != nil {
-               t.Fatal("error reading nm output: %v", err)
+               t.Fatalf("error reading nm output: %v", err)
        }
        if len(names) > 0 {
                t.Errorf("executable is missing %v symbols", names)
index a2d3d18f8f476ddf80d3b30b47e9988ff1fd5925..77605195e538e1b253ad1fa26c61082113275975 100644 (file)
@@ -200,7 +200,7 @@ func testPseudoprimes(t *testing.T, name string, cond func(nat) bool, want []int
                n[0] = Word(i)
                pseudo := cond(n)
                if pseudo && (len(want) == 0 || i != want[0]) {
-                       t.Errorf("%s(%v, base=2) = %v, want false", name, i)
+                       t.Errorf("%s(%v, base=2) = true, want false", name, i)
                } else if !pseudo && len(want) >= 1 && i == want[0] {
                        t.Errorf("%s(%v, base=2) = false, want true", name, i)
                }