Skip to content

Keep queue test checks active in Release builds - #67

Merged
rigtorp merged 1 commit into
masterfrom
v2/04b-test-checks
Nov 18, 2026
Merged

rigtorp merged 1 commit into
masterfrom
v2/04b-test-checks

Conversation

@rigtorp

@rigtorp rigtorp commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

- #undef NDEBUG
- assert(expr)
+ CHECK(expr)

Use SPSCQueue's test-only check macro. Release builds evaluate every check
and keep their normal NDEBUG setting when compiling the queue header.

Evidence

  • Before The test translation unit cleared NDEBUG to keep assertion
    expressions active, including calls to queue operations.
  • After Debug and Release passed in a clean checkout. With -DNDEBUG,
    an intentionally failing check printed its file and line and aborted.
    GCC 14 MC/DC reported 28/28 condition outcomes. Pre-commit passed.

Merge Danger

Door Two-way. The change is isolated to the test source.

Blast radius Test diagnostics and compilation settings.

Stacked on #66.

@rigtorp
rigtorp changed the base branch from v2/04-mcdc to master November 18, 2026 04:14
@rigtorp
rigtorp merged commit f1fa2a5 into master Nov 18, 2026
20 checks passed
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