test: coverage push 53.7% -> 86.5% (awesome-go ready)#63
Merged
Conversation
… to 82%+ - internal/parser: 79.6% -> 83.0% (xref edge cases, CMap parsing, error recovery) - internal/fonts: 72.3% -> 84.7% (TTF table parsing errors, subsetting, cmap format 12) - builder/internal: 73.5% -> 92.3% (CJK line break, font resolution, renderer paths) - creator/: 73.6% -> 83.3% (AddText variants, shapes, gradients, paths, annotations) 3,085 lines of new tests, table-driven, enterprise-grade
- internal/encoding: 48.7% -> 91.3% (Flate/DCT/ASCII85/LZW round-trips, predictor filters) - internal/tabledetect: 45.9% -> 86.9% (whitespace analysis, valley detection, column boundaries) - internal/document: 42.1% -> 98.4% (annotations, form fields, page operations, nil safety)
…o 82%+ - gxpdf (root): 31% -> 86.5% (Open, Extract, FormField wrappers, Table wrappers) - export/: 34.8% -> 84.5% (CSV/JSON/Excel round-trips, edge cases) - internal/application/forms: 9.3% -> 84.0% (field parsing, flattening, read/write) - internal/extractor: 38.4% -> 83.8% (text extraction, content stream ops) - internal/writer: 38.5% -> 82.8% (content streams, font objects, image xobjects) PROJECT-WIDE COVERAGE: 53.7% -> 86.5% 5,046 lines of new tests
- goconst: extract filterFlateDecode constant in extractor (production fix) - staticcheck: remove unnecessary fmt.Sprintf in forms test - unused: remove dead paletteImage type in encoding test - Fix syntax error from sed replacement in forms test
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…cov OIDC - gofmt: format 3 test files missed locally - goconst: extract colorSpaceDeviceRGB constant in extractor - goconst: use MethodLattice.String() in root test - staticcheck SA5011: use t.Fatal instead of t.Error before pointer deref - codecov: file -> files (v5 deprecated parameter) golangci-lint: 0 issues across all packages
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.
Summary
Raise project-wide test coverage from 53.7% to 86.5% — exceeding the awesome-go threshold of 80%.
11,200+ lines of enterprise-grade tests across 12 packages, written in 3 waves.
Wave 1 — Near-target packages
internal/parserinternal/fontsbuilder/internalcreator/Wave 2 — Mid-range packages
internal/encodinginternal/tabledetectinternal/documentWave 3 — Low-coverage packages
gxpdf(root)export/internal/application/formsinternal/extractorinternal/writerProduction fix
filterFlateDecodeconstant ininternal/extractor(goconst lint fix)All non-example packages now above 80%
Test plan
go test ./...— all 21 packages passgolangci-lint run— 0 issuesgo vet— clean