doc test_assert
This commit is contained in:
@@ -2,21 +2,20 @@
|
||||
|
||||
/**
|
||||
* \file Test.h
|
||||
* \brief File containing unit testing utilities
|
||||
* \brief Contient une assertion utilisable avec les optimisations
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
/**
|
||||
* \def TEST_SUCCESSFUL
|
||||
* \brief Used in tests to indicate that a test was successful
|
||||
* \brief Indique que le test a été passé
|
||||
*/
|
||||
#define TEST_SUCCESSFUL 0
|
||||
|
||||
/**
|
||||
* \def TEST_FAILED
|
||||
* \brief Used in tests to indicate that a test failed
|
||||
* \brief Indique que le test a échoué
|
||||
*/
|
||||
#define TEST_FAILED 1
|
||||
|
||||
@@ -30,9 +29,9 @@
|
||||
|
||||
/**
|
||||
* \def test_assert
|
||||
* \param ... The expression to evaluate
|
||||
* \brief Evaluates the expression and exits the program if not valid.
|
||||
* \note It works like a basic assert() but also in release mode
|
||||
* \param ... L'expression à évaluer
|
||||
* \brief Evalue une expression et arrête le programme si elle n'est pas valide
|
||||
* \note Cette macro équivaut à assert() mais fonctionne également avec les optimisations activées
|
||||
*/
|
||||
#define test_assert(...) \
|
||||
if (!static_cast<bool>(__VA_ARGS__)) { \
|
||||
|
||||
Reference in New Issue
Block a user