Skip to content

Add internal/pause coverage tests#4

Merged
hayabusa-cloud merged 1 commit into
mainfrom
coverage
Dec 16, 2025
Merged

Add internal/pause coverage tests#4
hayabusa-cloud merged 1 commit into
mainfrom
coverage

Conversation

@hayabusa-cloud

@hayabusa-cloud hayabusa-cloud commented Dec 16, 2025

Copy link
Copy Markdown
Owner

Summary

This PR raises test coverage for spin by adding focused unit tests for the internal CPU pause primitive.

What changed

  • Added unit tests for internal/pause:
    • internal/pause/impl_test.go
  • Covered the control-flow branches in Pause(cycles) (single-minimal pause vs pauseN).
  • Added an allocation check to keep the hot path allocation-free (testing.AllocsPerRun).

Notes

  • Tests are deliberately small and do not mock core behavior.
  • The allocation assertion is intended to protect performance-sensitive call sites.

Checklist

  • go test -race ./... passes

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hayabusa-cloud hayabusa-cloud marked this pull request as ready for review December 16, 2025 12:33
@hayabusa-cloud hayabusa-cloud merged commit 8f6b9c3 into main Dec 16, 2025
12 checks passed
@hayabusa-cloud hayabusa-cloud deleted the coverage branch December 16, 2025 12:34
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