include/SDL_test_assert.h
changeset 6718 918ba414168b
parent 6717 2acd95060548
child 6721 53b71f45a53a
equal deleted inserted replaced
6717:2acd95060548 6718:918ba414168b
    43 extern "C" {
    43 extern "C" {
    44 /* *INDENT-ON* */
    44 /* *INDENT-ON* */
    45 #endif
    45 #endif
    46 
    46 
    47 /**
    47 /**
       
    48  * \brief Fails the assert.
       
    49  */
       
    50 #define ASSERT_FAIL		0
       
    51 
       
    52 /**
       
    53  * \brief Passes the assert.
       
    54  */
       
    55 #define ASSERT_PASS		1
       
    56 
       
    57 /**
    48  * \brief Assert that logs and break execution flow on failures.
    58  * \brief Assert that logs and break execution flow on failures.
    49  *
    59  *
    50  * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    60  * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    51  * \param assertDescription Message to log with the assert describing it.
    61  * \param assertDescription Message to log with the assert describing it.
    52  */
    62  */
    55 /**
    65 /**
    56  * \brief Assert for test cases that logs but does not break execution flow on failures.
    66  * \brief Assert for test cases that logs but does not break execution flow on failures.
    57  *
    67  *
    58  * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    68  * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    59  * \param assertDescription Message to log with the assert describing it.
    69  * \param assertDescription Message to log with the assert describing it.
       
    70  *
       
    71  * \returns Returns the assertCondition so it can be used to externall to break execution flow if desired.
    60  */
    72  */
    61 void SDLTest_AssertCheck(int assertCondition, char *assertDescription);
    73 int SDLTest_AssertCheck(int assertCondition, char *assertDescription);
    62 
    74 
    63 /**
    75 /**
    64  * \brief Resets the assert summary counters to zero.
    76  * \brief Resets the assert summary counters to zero.
    65  */
    77  */
    66 void SDLTest_ResetAssertSummary();
    78 void SDLTest_ResetAssertSummary();