Commit 95eeae92 authored by Nina Džugasová's avatar Nina Džugasová Committed by Tomáš Oberhuber
Browse files

Added Assert documentation.

parent 4fa87549
Loading
Loading
Loading
Loading
+56 −1
Original line number Diff line number Diff line
@@ -34,20 +34,75 @@

// empty macros for optimized build
/**
 * \brief Assert that the expression \e val evaluates to \e true.
 * \brief Asserts that the expression \e val evaluates to \e true.
 *
 * The assertion succeeds if, and only if, \e val evaluates to equal to \e true.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_TRUE( val, msg )
/**
 * \brief Asserts that the expression \e val evaluates to \e false.
 *
 * The assertion succeeds if, and only if, \e val evaluates to equal to \e false.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_FALSE( val, msg )
/**
 * \brief Asserts that the expression \e val1 is equal to \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 and \e val2 are equal.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_EQ( val1, val2, msg )
/**
 * \brief Asserts that the expression \e val1 is not equal to \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 and \e val2 are not equal.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_NE( val1, val2, msg )
/**
 * \brief Asserts that the expression \e val1 is less than or equal to \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 is less than or equal to \e val2.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_LE( val1, val2, msg )
/**
 * \brief Asserts that the expression \e val1 is less than \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 is less than \e val2.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_LT( val1, val2, msg )
/**
 * \brief Asserts that the expression \e val1 is greater than or equal to \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 is greater than or equal to \e val2.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_GE( val1, val2, msg )
/**
 * \brief Asserts that the expression \e val1 is greater than \e val2.
 *
 * The assertion succeeds if, and only if, \e val1 is greater than \e val2.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e msg.
 */
#define TNL_ASSERT_GT( val1, val2, msg )
/**
 * \brief Asserts that the specified \e ___tnl__assert_condition is valid.
 *
 * The assertion succeeds if, and only if, ___tnl__assert_condition is valid.
 * On success the test continues without any side effects.
 * On failure the test is terminated with the error message \e ___tnl__assert_command.
#define TNL_ASSERT( ___tnl__assert_condition, ___tnl__assert_command )

#else /* #ifdef NDEBUG */
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ inline int roundUpDivision( const int num, const int div )
}

/**
 * \brief This function rounds \e number to the nearest multiple of number \e multiple.
 * \brief This function rounds up \e number to the nearest multiple of number \e multiple.
 *
 * @param number Integer we want to round.
 * @param multiple Integer.