diff --git a/filelock/file_lock_test.go b/filelock/file_lock_test.go index 3575fc2..6377a17 100644 --- a/filelock/file_lock_test.go +++ b/filelock/file_lock_test.go @@ -40,7 +40,7 @@ func TestLock(t *testing.T) { // Avoid truncating an existing, non-empty file. fi, err := os.Stat(filename) if err == nil && fi.Size() != 0 { - t.Fatal("The file %s is not empty", filename) + t.Fatalf("The file %s is not empty", filename) } t.Logf("Locking %s\n", filename) diff --git a/list2/list_test.go b/list2/list_test.go index 3ab21fd..ddb0e2f 100644 --- a/list2/list_test.go +++ b/list2/list_test.go @@ -57,7 +57,7 @@ func checkListPointers(t *testing.T, l *List, es []*Element) { Prev = prev } if p := e.prev; p != prev.index { - t.Errorf("elt[%d](%p).prev = %p, want %p", i, e, p, prev) + t.Errorf("elt[%d](%p).prev = %d, want %p", i, e, p, prev) } if p := e.Prev(); p != Prev { t.Errorf("elt[%d](%p).Prev() = %p, want %p", i, e, p, Prev) @@ -70,7 +70,7 @@ func checkListPointers(t *testing.T, l *List, es []*Element) { Next = next } if n := e.next; n != next.index { - t.Errorf("elt[%d](%p).next = %p, want %p", i, e, n, next) + t.Errorf("elt[%d](%p).next = %d, want %p", i, e, n, next) } if n := e.Next(); n != Next { t.Errorf("elt[%d](%p).Next() = %p, want %p", i, e, n, Next)