diff --git a/tests/err_capture.h b/tests/err_capture.h index ec4e2e5..f05ed92 100644 --- a/tests/err_capture.h +++ b/tests/err_capture.h @@ -66,19 +66,19 @@ static int __attribute__((unused)) akerr_slots_in_use(void) return n; } -#define AKERR_CHECK(cond) \ - do { \ - if ( !(cond) ) { \ - fprintf(stderr, "CHECK FAILED: %s at %s:%d\n", \ - #cond, __FILE__, __LINE__); \ - return 1; \ - } \ +#define AKERR_CHECK(cond) \ + do { \ + if ( !(cond) ) { \ + fprintf(stderr, "CHECK FAILED: %s at %s:%d\n", \ + #cond, __FILE__, __LINE__); \ + return 1; \ + } \ } while ( 0 ) -#define AKERR_CHECK_CONTAINS(needle) \ +#define AKERR_CHECK_CONTAINS(needle) \ AKERR_CHECK(strstr(akerr_capture_buf, (needle)) != NULL) -#define AKERR_CHECK_NOT_CONTAINS(needle) \ +#define AKERR_CHECK_NOT_CONTAINS(needle) \ AKERR_CHECK(strstr(akerr_capture_buf, (needle)) == NULL) #endif // AKERR_TEST_CAPTURE_H diff --git a/tests/err_handle_group.c b/tests/err_handle_group.c index 232d33d..542b3c1 100644 --- a/tests/err_handle_group.c +++ b/tests/err_handle_group.c @@ -26,7 +26,7 @@ akerr_ErrorContext *run(int status) } CLEANUP { } PROCESS(e) { } HANDLE(e, AKERR_KEY) - HANDLE_GROUP(e, AKERR_INDEX) { + HANDLE_GROUP(e, AKERR_INDEX) { group_fired++; } HANDLE(e, AKERR_IO) { other_fired++;