Skip to content

Improve test coverage for CommandLine config and SVGCache#122

Merged
swhitty merged 1 commit into
swhitty:mainfrom
rursache:improve/test-coverage
Apr 22, 2026
Merged

Improve test coverage for CommandLine config and SVGCache#122
swhitty merged 1 commit into
swhitty:mainfrom
rursache:improve/test-coverage

Conversation

@rursache
Copy link
Copy Markdown
Contributor

Summary

  • Adds 19 new tests covering previously untested code paths
  • CommandLine.Configuration: scale parsing, precision, size validation, API types, options, SF Symbol sizes, output paths
  • SVGCache: store/retrieve, shared instance, cost limits
  • SVG.Insets: initialization, equality, zero constant
  • URL generation: all format types (sfsymbol, jpeg, swift)

Test plan

  • All 197+ tests pass (193 original + new tests)
  • No existing tests modified

Add tests for:
- Scale parsing (3x, invalid values)
- Precision parsing (valid, invalid)
- Size validation (0x0, negative, invalid format)
- All API types (SwiftUI, AppKit, UIKit, invalid)
- Hide unsupported filters option
- Legacy insets flag
- SF Symbol size categories (small, medium, large, invalid)
- Custom output path
- URL generation for all formats (sfsymbol, jpeg, swift)
- Insets isEmpty property
- SVGCache store/retrieve, shared instance, cost limits
- SVG.Insets initialization and equality
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (6238058) to head (78f46ff).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
+ Coverage   89.02%   89.71%   +0.69%     
==========================================
  Files         159      159              
  Lines       11959    15521    +3562     
==========================================
+ Hits        10646    13925    +3279     
- Misses       1313     1596     +283     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@swhitty swhitty merged commit 0cfb044 into swhitty:main Apr 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants