Cover lexer string/predicate and content-stream array branches#20
Merged
Conversation
- lex readLiteralString: \r\t\b\f escapes, CR/CRLF continuations, bare CR->LF, unknown escape, and the trailing-backslash/unterminated errors - lex IsDelimiter, hexDigit: spec §7.2.2 character-set classifiers - contentstream readArray: name/bool/null/nested element kinds + errors - contentstream Operand.Int: non-number and int64-overflow cases - xref indexEOL: no-EOL sentinel
Keep only comments that explain intent or a footgun a reader can't get from the test body, git, or the PR; delete or inline the rest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch of coverage backfill on logic-bearing helper paths (follows #19).
Characterization tests only — no production code changed.
Covered
internal/lex.readLiteralString—\r\t\b\fescapes, CR/CRLF line continuations, bare CR/CRLF → LF, unknown escapes, and the trailing-backslash / unterminated error paths (70% → 98%)internal/lexIsDelimiter/hexDigit— spec §7.2.2 character-set classifiers (→ 100%)contentstream.readArray— name/bool/null/nested-array/nested-dict element kinds + unexpected-keyword/unterminated errors (61% → 91%)contentstream.Operand.Int— non-number operand and int64-overflow cases (→ 100%)xref.indexEOL— the no-EOL sentinel (→ 100%)internal/lex81.7% → 90.9%,contentstream75.8% → 82.3%; overall 83.1% → 84.6%.go vetandgofmtclean.Still deliberately uncovered
Same as #19: the LZW early-change=1 boundary (needs a real qpdf/Ghostscript fixture),
examples//main()entry points, and no-logic getters/markers.