summaryrefslogtreecommitdiff
path: root/internal/stats/debugstring_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-08 22:18:05 +0200
committerPaul Buetow <paul@buetow.org>2026-02-08 22:18:05 +0200
commitcb75ff8fc1093c0bb29014fa324ca5888c445551 (patch)
tree61631688ba195afcaeb6239cca3e0993182ffdff /internal/stats/debugstring_test.go
parent5405ac39897ed1658e895152c5f7b99c2dbf45d6 (diff)
Add unit tests to improve coverage above 80% target
Implement comprehensive unit tests for critical internal packages to increase overall test coverage from 80.9% to 81.8%, providing a buffer above the 80% threshold specified in project guidelines. Changes: - Add config parsing tests (parseTemperatureValue, decodeModelEntry, resolvedModel, parseSurfaceEntries) - Add HumanBytes utility tests with edge cases and boundary values - Fix HumanBytes bug: corrected suffix array indexing (off-by-one error) - Fix HumanBytes to handle negative values correctly - Add comprehensive shellJoin and isSafeBare tests for shell escaping - Update comments to reflect actual behavior and implementation details Coverage impact: - internal/appconfig: Improved config parsing function coverage - internal/textutil: HumanBytes now at 100% coverage (fixed bug in process) - internal/tmux: shellJoin and isSafeBare now at 100% coverage - Overall project: 80.9% → 81.8% (+0.9%) All tests pass. Code formatted with gofumpt. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/stats/debugstring_test.go')
0 files changed, 0 insertions, 0 deletions