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:
@@ -10,6 +10,8 @@
|
||||
* library exit(1)s.
|
||||
*/
|
||||
|
||||
static int handled_status = 0;
|
||||
|
||||
akerr_ErrorContext *validate(void)
|
||||
{
|
||||
PREPARE_ERROR(e);
|
||||
@@ -31,6 +33,7 @@ akerr_ErrorContext *one_cycle(void)
|
||||
} CLEANUP {
|
||||
} PROCESS(e) {
|
||||
} HANDLE(e, AKERR_KEY) {
|
||||
handled_status = e->status;
|
||||
} HANDLE(e, AKERR_VALUE) {
|
||||
} FINISH(e, false);
|
||||
return e;
|
||||
@@ -42,7 +45,9 @@ int main(void)
|
||||
AKERR_CHECK(akerr_slots_in_use() == 0);
|
||||
|
||||
for ( int i = 0; i < 32; i++ ) {
|
||||
handled_status = 0;
|
||||
(void)one_cycle();
|
||||
AKERR_CHECK(handled_status == AKERR_KEY);
|
||||
}
|
||||
|
||||
AKERR_CHECK(akerr_slots_in_use() == 0);
|
||||
|
||||
Reference in New Issue
Block a user