Skip to content

Adopt subtests and add chart examples and benchmarks - #22

Merged
namest504 merged 14 commits into
mainfrom
test/style-and-docs
Aug 21, 2026
Merged

Adopt subtests and add chart examples and benchmarks#22
namest504 merged 14 commits into
mainfrom
test/style-and-docs

Conversation

@namest504

Copy link
Copy Markdown
Owner

Summary

  • Table cases across chart/store/cmd tests get names and run as subtests; failure messages follow the got/want convention; repeated assertions move into t.Helper helpers; key/rkey test helpers consolidated
  • Testable examples for Sparkline and Render (future pkg.go.dev docs if the package goes public)
  • Benchmarks for Render (per style) and monotoneCubic as a performance baseline

Test files only — no production code changes.

Make chartStyles the single source of truth for style codes so
chartOptionsFor and newSettingsModel can no longer disagree on the
fallback for an unknown code: both now fall back to braille2 instead
of chartOptionsFor's braille2 vs newSettingsModel's index-0 braille1,
which used to render braille2, display braille1, and silently rewrite
the config to braille1 on any unrelated settings change.

Also: drawSettings truncates rows/help to terminal width like
drawMenu/history do; renderBraille's loop locals no longer shadow the
lo/hi bounds parameters; MockScreen in typing_renderer_test.go keeps
one cell map instead of two.
@namest504
namest504 changed the base branch from test/coverage-gaps to main August 21, 2026 00:24
@namest504
namest504 merged commit 7fc4299 into main Aug 21, 2026
1 check passed
@namest504
namest504 deleted the test/style-and-docs branch August 21, 2026 00:24
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.

1 participant