VirtualBox

Changeset 54470 in vbox for trunk/include/iprt/test.h


Ignore:
Timestamp:
Feb 24, 2015 9:35:26 PM (10 years ago)
Author:
vboxsync
Message:

iprt/test.h: Added RTTESTI_CHECK_RC_OK_BREAK.

File:
1 edited

Legend:

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

    r46298 r54470  
    12561256        } \
    12571257    } else do {} while (0)
    1258 
    1259 
    12601258/** @def RTTESTI_CHECK_RC_OK
    12611259 * Check whether a IPRT style status code indicates success.
     
    12711269        if (RT_FAILURE(rcCheck)) { \
    12721270            RTTestIFailed("line %u: %s: %Rrc", __LINE__, #rcExpr, rcCheck); \
     1271        } \
     1272    } while (0)
     1273/** @def RTTESTI_CHECK_RC_OK_BREAK
     1274 * Check whether a IPRT style status code indicates success.
     1275 *
     1276 * If a different status code is return, call RTTestIFailed giving the line
     1277 * number, expression, actual and expected status codes, then break.
     1278 *
     1279 * @param   rcExpr          The expression resulting in an IPRT status code.
     1280 */
     1281#define RTTESTI_CHECK_RC_OK_BREAK(rcExpr) \
     1282    do { \
     1283        int rcCheck = (rcExpr); \
     1284        if (RT_FAILURE(rcCheck)) { \
     1285            RTTestIFailed("line %u: %s: %Rrc", __LINE__, #rcExpr, rcCheck); \
     1286            break; \
    12731287        } \
    12741288    } while (0)
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