test: print neutral RUN marker on longjmp failure-return branch
The else branch of main()'s per-test setjmp loop — taken when a failed assertion longjmps back — now prints "RUN: <name> (assertion failed)" instead of "FAIL: <name>". The marker still names the failing test and its own per-test `failed` counter, but contains no PASS/FAIL outcome token (outcome labels are deferred to a later sibling of bf-53ut). g_failure_count accounting is unchanged: test_record_failure() already bumped it before the longjmp, so this branch only prints. Child 1 of 4 for bf-38e9 (split-child 2 of bf-53ut). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8fbc2e82c3
commit
6e454803fb
1 changed files with 3 additions and 3 deletions
|
|
@ -220,8 +220,8 @@ static int test_entry_cmp(const void *a, const void *b)
|
|||
*
|
||||
* Failure counting is deliberately NOT repeated here. test_record_failure()
|
||||
* already bumped g_failure_count before it longjmp'd out of the failing test,
|
||||
* so the else branch below only prints the FAIL line and its own per-test
|
||||
* counter — it leaves g_failure_count alone. That keeps a single source of
|
||||
* so the else branch below only prints a neutral marker line naming the test
|
||||
* and its own per-test counter — it leaves g_failure_count alone. That keeps a single source of
|
||||
* truth for "did anything fail anywhere", and the exit code reads that truth
|
||||
* directly (g_failure_count > 0). The local `failed` counter mirrors it only
|
||||
* for the summary line, where it pairs with `passed` to total g_test_count.
|
||||
|
|
@ -258,7 +258,7 @@ int main(void)
|
|||
printf("PASS: %s\n", g_tests[i].name);
|
||||
passed++;
|
||||
} else {
|
||||
printf("FAIL: %s\n", g_tests[i].name);
|
||||
printf("RUN: %s (assertion failed)\n", g_tests[i].name);
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue