test: regroup added tests into a few thematic files by function#71
Conversation
The hardening work scattered tests across many small single-purpose
files. Regroup everything I added into a few thematic files, leaving the
source-shaped test files (conv/map/slice/struct/interface/value/call/
func/extern/util) untouched. No test logic changes (210 -> 210 funcs,
suite green). convert test files 21 -> 15.
Black-box (convert_test):
- keys_test: map keys + deterministic ordering
(hashable + order + identity + decorate)
- conversion_test: value conversion correctness/safety
(checked + unwrap + review_misc: Duration/typed-nil/...)
- robustness_test: no-panic + bridge contracts + freeze/concurrency
(panics + safestring + bridge_contract + freeze_race)
White-box (convert): internal_test (already consolidated)
Root: starlight_features_test (dialect + WithGlobals); starlight_test untouched
Each file opens with a commented section list. Also documents the test
organization rule in CLAUDE.md so future tests follow it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 530 |
| Duplication | 20 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (2612ecc) 2124 1915 90.16% Head commit (767589f) 2124 (+0) 1915 (+0) 90.16% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#71) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #71 +/- ##
=======================================
Coverage 87.12% 87.12%
=======================================
Files 8 8
Lines 1662 1662
=======================================
Hits 1448 1448
Misses 131 131
Partials 83 83 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Why
The hardening work scattered tests across many small single-purpose files (one per fix/feature). Regroup everything I added into a few thematic files, leaving the source-shaped test files untouched (
conv/map/slice/struct/interface/value/call/func/extern/util). No test logic changes — 210 → 210 test funcs, suite green.converttest files 21 → 15, root 3 → 2.New structure
Black-box (
convert_test):keys_test.goconversion_test.gorobustness_test.goWhite-box (
convert):internal_test.go(caches, comparableByValue, stableKeyString, panic sentinel)Root:
starlight_features_test.go(dialect + WithGlobals);starlight_test.gountouchedEach file opens with a commented section list. Also adds a test-organization rule to CLAUDE.md so future tests are added as sections, not new files. Full suite
-race -count=2; Go 1.19 via Docker.🤖 Generated with Claude Code