Expand error status test coverage
All checks were successful
libakerror CI Build / cmake_build (push) Successful in 2m44s
libakerror CI Build / mutation_test (push) Successful in 7m46s

- 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:
2026-07-29 17:09:45 -04:00
parent 4212ff0b28
commit 4ae1decde2
16 changed files with 135 additions and 9 deletions

View File

@@ -11,6 +11,8 @@
static int group_fired = 0;
static int other_fired = 0;
static int group_status = 0;
static int other_status = 0;
akerr_ErrorContext *boom(int status)
{
@@ -28,8 +30,10 @@ akerr_ErrorContext *run(int status)
} HANDLE(e, AKERR_KEY)
HANDLE_GROUP(e, AKERR_INDEX) {
group_fired++;
group_status = e->status;
} HANDLE(e, AKERR_IO) {
other_fired++;
other_status = e->status;
} FINISH(e, false);
return e;
}
@@ -40,15 +44,18 @@ int main(void)
run(AKERR_KEY);
AKERR_CHECK(group_fired == 1);
AKERR_CHECK(group_status == AKERR_KEY);
AKERR_CHECK(other_fired == 0);
run(AKERR_INDEX);
AKERR_CHECK(group_fired == 2);
AKERR_CHECK(group_status == AKERR_INDEX);
AKERR_CHECK(other_fired == 0);
run(AKERR_IO);
AKERR_CHECK(group_fired == 2);
AKERR_CHECK(other_fired == 1);
AKERR_CHECK(other_status == AKERR_IO);
AKERR_CHECK(akerr_slots_in_use() == 0);
fprintf(stderr, "err_handle_group ok\n");