commit cf0f7283e49a82fa3a5f0b50f8b8116fdd15c795
parent 855516fb7b0121214919a8410f98d806a4096b95
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Wed, 18 Nov 2026 16:51:29 +0100
mhdt_checks.h: added new simple helpers
Diffstat:
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/tests/mhdt_checks.h b/src/tests/mhdt_checks.h
@@ -180,6 +180,14 @@ MHDT_set_verbosity (enum MHDT_VerbosityLevelEnum level)
* ****** Functions for getting results ******
*/
+/* Return non-zero if all checks of the current test have succeeded so far,
+ zero if any has failed */
+static inline int
+MHDT_are_all_checks_succeed (void)
+{
+ return (0u == MHDT_checks_err_counter);
+}
+
/* Return non-zero if succeeded, zero if failed */
static inline int
@@ -231,6 +239,15 @@ MHDT_test_result (const char *filename,
MHDT_test_result (__FILE__, __LINE__, MHD_FUNC_, desc)
+/* Return non-zero if all completed tests have succeeded, zero if any has
+ failed. A test is completed by MHDT_test_result(). */
+static inline int
+MHDT_are_all_tests_succeed (void)
+{
+ return (0u == MHDT_tests_err_counter);
+}
+
+
/* Return ZERO on success, ONE if any test failed */
static inline int
MHDT_final_result (const char *exec_selfname,