Skip to content

Commit de7f63d

Browse files
committed
Tighten two test comments that still restated the cases
looksLikeText: drop the rule list the named cases already show, keep the non-obvious high-byte magic values. parseObjectFrom: drop the meta parenthetical.
1 parent e35135f commit de7f63d

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

parse_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestModeratelyNestedArrayResolves(t *testing.T) {
7171
}
7272
}
7373

74-
// Malformed token streams must error, never panic (cases labelled inline).
74+
// Malformed token streams must error, never panic.
7575
func TestParseObjectErrors(t *testing.T) {
7676
for _, src := range []string{
7777
"", // EOF where an object is expected

text_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ func TestParseDate(t *testing.T) {
9696
}
9797
}
9898

99-
// looksLikeText drives the dump heuristic that decides whether a string is
100-
// rendered inline or hex-escaped: BOMs and ASCII are text; control bytes are
101-
// not; high bytes are text only if they decode cleanly under PDFDocEncoding
102-
// (0x80 = bullet) and not when they hit an undefined slot (0x9F).
99+
// The dump heuristic for rendering a string inline vs hex-escaped. The
100+
// high-byte cases are the subtle ones: 0x80 is a clean PDFDocEncoding glyph
101+
// (bullet), 0x9F an undefined slot.
103102
func TestLooksLikeText(t *testing.T) {
104103
cases := []struct {
105104
name string

0 commit comments

Comments
 (0)