From 8954d0c274fedb54f416d65255d61fb8b3e909f8 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 27 Sep 2018 13:51:25 +0200 Subject: [PATCH] Write documentation for TEST_ASSERT --- tests/suites/helpers.function | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function index 32b1b790d4..ad219ab63f 100644 --- a/tests/suites/helpers.function +++ b/tests/suites/helpers.function @@ -69,6 +69,18 @@ typedef struct data_tag /*----------------------------------------------------------------------------*/ /* Macros */ +/** Evaluate an expression and fail the test case if it is false. + * + * Failing the test means: + * - Mark this test case as failed. + * - Print a message identifying the failure. + * - Jump to the \c exit label. + * + * This macro expands to an instruction, not an expression. + * It may jump to the \c exit label. + * + * \param TEST The expression to evaluate. + */ #define TEST_ASSERT( TEST ) \ do { \ if( ! (TEST) ) \