pkg/dwarf/line: use t.Logf instead of fmt.Printf in tests (#3772)
This commit is contained in:
parent
ef13067401
commit
b791f91c0e
@ -6,7 +6,6 @@ import (
|
||||
"debug/macho"
|
||||
"debug/pe"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -272,7 +271,7 @@ func runTestPCToLine(t testing.TB, lineInfos DebugLines, entries []pctolineEntry
|
||||
file, line := lineInfos[0].PCToLine(basePC, pc)
|
||||
if pc == entries[i].pc {
|
||||
if i%samples == 0 && log {
|
||||
fmt.Printf("match %x / %x (%v)\n", pc, entries[len(entries)-1].pc, time.Since(t0)/samples)
|
||||
t.Logf("match %x / %x (%v)\n", pc, entries[len(entries)-1].pc, time.Since(t0)/samples)
|
||||
t0 = time.Now()
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,6 @@ func testseq2intl(t *testing.T, fixture protest.Fixture, grp *proc.TargetGroup,
|
||||
fnname = fn.Name
|
||||
}
|
||||
t.Logf("at %#x (%s) %s:%d", pc, fnname, f, ln)
|
||||
//fmt.Printf("at %#x %s:%d\n", pc, f, ln)
|
||||
}
|
||||
switch pos := tc.pos.(type) {
|
||||
case int:
|
||||
|
Loading…
Reference in New Issue
Block a user