Expand error status test coverage
- Added explicit status validation across error handling tests. - Added lifecycle and slot-leak checks to older tests. - Improved unhandled-error propagation coverage. - Added repository guidance and a test runner script. - Verified all 23 CTest tests pass. Co-Authored by Codex GPT 5.4
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
static int specific_fired = 0;
|
||||
static int default_fired = 0;
|
||||
static int default_status = 0;
|
||||
|
||||
akerr_ErrorContext *boom(void)
|
||||
{
|
||||
@@ -28,10 +29,12 @@ int main(void)
|
||||
specific_fired = 1; /* must NOT run: error is AKERR_TYPE */
|
||||
} HANDLE_DEFAULT(e) {
|
||||
default_fired = 1;
|
||||
default_status = e->status;
|
||||
} FINISH_NORETURN(e);
|
||||
|
||||
AKERR_CHECK(specific_fired == 0);
|
||||
AKERR_CHECK(default_fired == 1);
|
||||
AKERR_CHECK(default_status == AKERR_TYPE);
|
||||
AKERR_CHECK(akerr_slots_in_use() == 0);
|
||||
fprintf(stderr, "err_handle_default ok\n");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user