pkg/dwarf/line: use t.Logf instead of fmt.Printf in tests (#3772)

This commit is contained in:
Oleksandr Redko 2024-07-11 20:19:09 +03:00 committed by GitHub
parent ef13067401
commit b791f91c0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

@ -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: