diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/test/test.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/test/test.h b/src/regress/lib/libcrypto/test/test.h index e6cfec80ea..051871dd35 100644 --- a/src/regress/lib/libcrypto/test/test.h +++ b/src/regress/lib/libcrypto/test/test.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: test.h,v 1.1 2025/05/21 08:57:13 joshua Exp $ */ | 1 | /* $OpenBSD: test.h,v 1.2 2025/05/22 02:23:41 joshua Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2025 Joshua Sing <joshua@joshuasing.dev> | 3 | * Copyright (c) 2025 Joshua Sing <joshua@joshuasing.dev> |
| 4 | * | 4 | * |
| @@ -82,7 +82,9 @@ void test_logf_internal(struct test *_t, const char *_label, const char *_func, | |||
| 82 | * stderr if the test fails. | 82 | * stderr if the test fails. |
| 83 | */ | 83 | */ |
| 84 | #define test_logf(t, fmt, ...) \ | 84 | #define test_logf(t, fmt, ...) \ |
| 85 | test_logf_internal(t, NULL, __func__, __FILE__, __LINE__, fmt, ##__VA_ARGS__) | 85 | do { \ |
| 86 | test_logf_internal(t, NULL, __func__, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ | ||
| 87 | } while (0) | ||
| 86 | 88 | ||
| 87 | /* | 89 | /* |
| 88 | * test_errorf prints an error message. It will also cause the test to fail. | 90 | * test_errorf prints an error message. It will also cause the test to fail. |
| @@ -93,8 +95,10 @@ void test_logf_internal(struct test *_t, const char *_label, const char *_func, | |||
| 93 | * information about what is broken. | 95 | * information about what is broken. |
| 94 | */ | 96 | */ |
| 95 | #define test_errorf(t, fmt, ...) \ | 97 | #define test_errorf(t, fmt, ...) \ |
| 96 | test_logf_internal(t, "ERROR", __func__, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ | 98 | do { \ |
| 97 | test_fail(t) | 99 | test_logf_internal(t, "ERROR", __func__, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ |
| 100 | test_fail(t); \ | ||
| 101 | } while (0) | ||
| 98 | 102 | ||
| 99 | /* | 103 | /* |
| 100 | * test_skip marks the test as skipped. Once called, the test should return. | 104 | * test_skip marks the test as skipped. Once called, the test should return. |
