Skip to content

Commit fdbf4f7

Browse files
committed
Fix format string failures in two tests
go_test.go and dump.go failed due to errors in values provided in format strings. Fix both failure cases.
1 parent e389fc5 commit fdbf4f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dump.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (d *dumpState) writeString(s string) {
9797
case 4:
9898
d.write(uint32(size))
9999
default:
100-
panic(fmt.Sprintf("unsupported pointer size (%d)"))
100+
panic(fmt.Sprintf("unsupported pointer size (%d)", header.PointerSize))
101101
}
102102
if size > 0 {
103103
d.write(ba)

go_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestIsControl(t *testing.T) {
2929
for i := 0; i < 256; i++ {
3030
control := i < 0x20 || i == 0x7f
3131
if lib := unicode.Is(unicode.Cc, rune(i)); control != lib {
32-
t.Errorf("%x: is control? %s", i, lib)
32+
t.Errorf("%x: is control? %s", i, strconv.FormatBool(lib))
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)