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/macho"
|
||||||
"debug/pe"
|
"debug/pe"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
@ -272,7 +271,7 @@ func runTestPCToLine(t testing.TB, lineInfos DebugLines, entries []pctolineEntry
|
|||||||
file, line := lineInfos[0].PCToLine(basePC, pc)
|
file, line := lineInfos[0].PCToLine(basePC, pc)
|
||||||
if pc == entries[i].pc {
|
if pc == entries[i].pc {
|
||||||
if i%samples == 0 && log {
|
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()
|
t0 = time.Now()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +594,6 @@ func testseq2intl(t *testing.T, fixture protest.Fixture, grp *proc.TargetGroup,
|
|||||||
fnname = fn.Name
|
fnname = fn.Name
|
||||||
}
|
}
|
||||||
t.Logf("at %#x (%s) %s:%d", pc, fnname, f, ln)
|
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) {
|
switch pos := tc.pos.(type) {
|
||||||
case int:
|
case int:
|
||||||
|
Loading…
Reference in New Issue
Block a user