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:
@@ -1,4 +1,5 @@
|
||||
#include "akerror.h"
|
||||
#include "err_capture.h"
|
||||
|
||||
int x;
|
||||
|
||||
@@ -34,10 +35,15 @@ int main(void)
|
||||
} CLEANUP {
|
||||
} PROCESS(errctx) {
|
||||
} HANDLE(errctx, AKERR_NULLPOINTER) {
|
||||
AKERR_CHECK_STATUS(errctx, AKERR_NULLPOINTER);
|
||||
if ( x == 0 ) {
|
||||
fprintf(stderr, "Cleanup works\n");
|
||||
return 0;
|
||||
akerr_log_method("Cleanup works\n");
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
} FINISH_NORETURN(errctx);
|
||||
|
||||
AKERR_CHECK(akerr_slots_in_use() == 0);
|
||||
fprintf(stderr, "err_cleanup ok\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user