mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
cmd/geth: fix logging test
This commit is contained in:
parent
d83ebf8f34
commit
da5747990d
1 changed files with 4 additions and 4 deletions
|
|
@ -91,7 +91,7 @@ func testConsoleLogging(t *testing.T, format string, tStart, tEnd int) {
|
||||||
have = censor(have, tStart, tEnd)
|
have = censor(have, tStart, tEnd)
|
||||||
want = censor(want, tStart, tEnd)
|
want = censor(want, tStart, tEnd)
|
||||||
if have != want {
|
if have != want {
|
||||||
t.Logf(nicediff([]byte(have), []byte(want)))
|
t.Log(nicediff([]byte(have), []byte(want)))
|
||||||
t.Fatalf("format %v, line %d\nhave %v\nwant %v", format, i, have, want)
|
t.Fatalf("format %v, line %d\nhave %v\nwant %v", format, i, have, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -142,7 +142,7 @@ func TestJsonLogging(t *testing.T) {
|
||||||
}
|
}
|
||||||
if !bytes.Equal(have, want) {
|
if !bytes.Equal(have, want) {
|
||||||
// show an intelligent diff
|
// show an intelligent diff
|
||||||
t.Logf(nicediff(have, want))
|
t.Log(nicediff(have, want))
|
||||||
t.Errorf("file content wrong")
|
t.Errorf("file content wrong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +211,7 @@ func TestFileOut(t *testing.T) {
|
||||||
}
|
}
|
||||||
if !bytes.Equal(have, want) {
|
if !bytes.Equal(have, want) {
|
||||||
// show an intelligent diff
|
// show an intelligent diff
|
||||||
t.Logf(nicediff(have, want))
|
t.Log(nicediff(have, want))
|
||||||
t.Errorf("file content wrong")
|
t.Errorf("file content wrong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -231,7 +231,7 @@ func TestRotatingFileOut(t *testing.T) {
|
||||||
}
|
}
|
||||||
if !bytes.Equal(have, want) {
|
if !bytes.Equal(have, want) {
|
||||||
// show an intelligent diff
|
// show an intelligent diff
|
||||||
t.Logf(nicediff(have, want))
|
t.Log(nicediff(have, want))
|
||||||
t.Errorf("file content wrong")
|
t.Errorf("file content wrong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue