Skip to content

v0.26.12: core/ test coverage 73.9% → 85.5% (COV-004)#165

Merged
kolkov merged 1 commit intomainfrom
release/v0.26.12
Apr 30, 2026
Merged

v0.26.12: core/ test coverage 73.9% → 85.5% (COV-004)#165
kolkov merged 1 commit intomainfrom
release/v0.26.12

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented Apr 30, 2026

Summary

Real unit + regression tests for core/ — coverage 73.9% → 85.5% (+11.6pp)

Not boilerplate — every test verifies actual behavior with meaningful assertions.

New test files (1912 LOC)

  • core/error_test.go (~600 LOC) — 10 error types: all Kind variants, Unwrap/errors.Is/errors.As chains, error message content, empty label fallback, sentinel distinctness
  • core/buffer_mapping_test.go (~500 LOC) — MapWaiter lifecycle (signal/wait/cancel/reset), BeginMap rejection states (destroyed/pending/mapped), alignment errors, range overflow, MarkDestroyed during pending, UnmapBuffer transitions, TryRegisterMappedRange overlap, concurrent Wait (5 goroutines)
  • core/device_poll_test.go (~200 LOC) — RegisterPendingMap, PollMaps submission resolution, HasPendingMaps, MaxKnownSubmissionIndex, free-list recycling, submission index 0 immediate resolution, HalDeviceHandle

Test plan

  • go test ./core/... — all pass, 85.5% coverage
  • go test ./... — all pass
  • golangci-lint run — 0 issues on all 3 platforms
  • gofmt -l . — clean
  • CI

…device poll (COV-004)

core/ coverage: 73.9% → 85.5% (+11.6pp)

- error_test.go: 10 error types, all Kind variants, Unwrap/errors.Is/errors.As chains
- buffer_mapping_test.go: MapWaiter lifecycle, BeginMap states, MarkDestroyed,
  UnmapBuffer transitions, TryRegisterMappedRange overlap, concurrent Wait
- device_poll_test.go: RegisterPendingMap, PollMaps resolution, free-list recycling
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 6dff460 into main Apr 30, 2026
11 checks passed
@kolkov kolkov deleted the release/v0.26.12 branch April 30, 2026 20:26
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