VirtualBox

Changeset 18366 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Mar 27, 2009 3:13:28 AM (16 years ago)
Author:
vboxsync
Message:

RTTest: RTTEST_CHECK, doxygen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/test.h

    r18364 r18366  
    11/** @file
    2  * IPRT - Test.
     2 * IPRT - Testcase Framework.
    33 */
    44
     
    3535#include <iprt/stdarg.h>
    3636
     37__BEGIN_DECLS
     38
     39/** @defgroup grp_rt_test       RTTest - Testcase Framework.
     40 * @ingroup grp_rt
     41 * @{
     42 */
     43
    3744/** A test handle. */
    3845typedef struct RTTESTINT *RTTEST;
     
    4653
    4754
    48 __BEGIN_DECLS
    49 
    50 
    5155/**
    5256 * Creates a test instance.
     
    204208RTR3DECL(int) RTTestFailed(RTTEST hTest, const char *pszFormat, ...);
    205209
     210
     211/** @def RTTEST_CHECK
     212 * Check whether a boolean expression holds true.
     213 *
     214 * If the expression is false, call RTTestFailed giving the line number and expression.
     215 *
     216 * @param   hTest       The test handle.
     217 * @param   expr        The expression to evaluate.
     218 */
     219#define RTTEST_CHECK(hTest, expr) \
     220    do { if (!(expr)) { RTTestFailed((hTest), "line %u: %s", __LINE__, #expr); } } while (0)
     221
     222
     223/** @}  */
     224
    206225__END_DECLS
    207226
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette