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

@@ -1,4 +1,10 @@
#include "akerror.h"
#include <stdlib.h>
static void expect_unhandled_nullpointer(akerr_ErrorContext *errctx)
{
exit((errctx != NULL && errctx->status == AKERR_NULLPOINTER) ? 1 : 0);
}
akerr_ErrorContext *func2(void)
{
@@ -25,6 +31,9 @@ akerr_ErrorContext *func1(void)
int main(void)
{
akerr_init();
akerr_handler_unhandled_error = &expect_unhandled_nullpointer;
PREPARE_ERROR(errctx);
ATTEMPT {
CATCH(errctx, func1());