Skip to content

Fix custom suite teardown with omitted begin/end#841

Open
94xhn wants to merge 1 commit into
ThrowTheSwitch:masterfrom
94xhn:fix/omit-begin-end-suite-teardown
Open

Fix custom suite teardown with omitted begin/end#841
94xhn wants to merge 1 commit into
ThrowTheSwitch:masterfrom
94xhn:fix/omit-begin-end-suite-teardown

Conversation

@94xhn

@94xhn 94xhn commented Jul 14, 2026

Copy link
Copy Markdown

🍍

Problem

When omit_begin_end and a custom suite_teardown are enabled together, the generated runner defines suiteTearDown() but calls suite_teardown(0). Strict C99 compilation then fails because the called function does not exist.

Fix

Call the emitted suiteTearDown() hook in the omit-begin/end path and add a generator regression test for this option combination.

Verification

  • New targeted generator regression passes.
  • The baseline generated runner fails -Werror=implicit-function-declaration; the fixed runner compiles.
  • A fixed generated runner executes one test with 1 Tests 0 Failures 0 Ignored.
  • Ruby syntax checks and git diff --check pass.

The full script suite passed the new regression and its first 38 existing cases before this Windows environment returned EACCES while launching an existing generated executable.

The omit-begin/end path generated a snake_case call, but the custom
hook is defined as suiteTearDown. Generated C therefore failed strict
C99 compilation.

Constraint: Preserve app-owned Unity lifecycle setup and cleanup
Rejected: Rename suiteTearDown | public docs use this hook name
Confidence: high
Scope-risk: narrow
Directive: Match calls to the emitted teardown hook name
Tested: Targeted regression, strict C99 compile, host run, Ruby syntax
Not-tested: Full scripts suite beyond existing Windows EACCES
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