Skip to content

Commit

Permalink
pkg: use t.Log instead of fmt.Println in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Jul 11, 2024
1 parent 8e9607a commit 9d39ab9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/dwarf/line/line_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"debug/macho"
"debug/pe"
"flag"
"fmt"
"io"
"os"
"os/exec"
Expand Down Expand Up @@ -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()
}

Expand Down
1 change: 0 additions & 1 deletion pkg/proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9d39ab9

Please sign in to comment.