Cover under-tested parser helper branches#19
Merged
Conversation
Backfill characterization tests for logic-bearing untrusted-input paths that were below coverage; no production code changed. - xref skipEOL: CR/LF/CRLF/leading-space line-ending rules - filter paramsFromDict: predictor knobs + /EarlyChange semantics - reader streamLength: missing/non-integer/negative /Length guards - contentstream readValue: every value kind + EOF/delimiter/keyword errors - internal/filter paeth/abs + ErrUnsupported message - crypt computeV5Key: owner-password path + >127 truncation - lex position accessors
Member
|
If you want me to comment only and not merge them directly after a review, please tell me. I take a look at your pull requests, find them good (perfect) and then I don't see a point in having an extra loop. Stop me if you want. |
Collaborator
Author
|
@pgundlach I let you know if there something that rises questions, at the moment I am just trying to increase coverage. |
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.
Backfill test coverage on logic-bearing, untrusted-input helper paths that were
below coverage. Characterization tests only — no production code changed.
Covered
xref.skipEOL— CR/LF/CRLF/leading-space line-ending rules (§7.5.4)filter.paramsFromDict— predictor knobs +/EarlyChangesemanticsreader.streamLength— missing / non-integer / negative/Lengthguardscontentstream.readValue— every value kind + EOF/delimiter/unexpected-keyword errorsinternal/filterpaeth/abs(hand-computed PNG §6.6 vectors) +ErrUnsupportedmessagecrypt.computeV5Key— owner-password path + >127-byte password truncationinternal/lexposition accessorsEach targeted function went from <70% (several at 0%) to 90–100%; overall 81.2% → 83.1%.
go vetandgofmtclean.Deliberately left uncovered
examples/andcmdmain()entry points, and no-logic getters (Stream.RawLength, interface marker methods) — testing them asserts nothing about correctness.