mirror of https://github.com/siddontang/go.git
Fix Errorf formatting
Fix #9. Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
This commit is contained in:
parent
bdc77568d7
commit
3ebea78bc3
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue