VirtualBox

Changeset 54481 in vbox for trunk/include


Ignore:
Timestamp:
Feb 25, 2015 11:37:47 AM (10 years ago)
Author:
vboxsync
Message:

iprt/test.h: Added RTTESTI_CHECK_MSG_BREAK.

File:
1 edited

Legend:

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

    r54470 r54481  
    11261126        RTTestIFailed("line %u: %s", __LINE__, #expr); \
    11271127        break; \
    1128     } do {} while (0)
     1128    } else do {} while (0)
    11291129
    11301130
     
    11451145         } \
    11461146    } while (0)
     1147/** @def RTTESTI_CHECK_MSG_BREAK
     1148 * Check whether a boolean expression holds true, returns on false.
     1149 *
     1150 * If the expression is false, call RTTestIFailed giving the line number and
     1151 * expression.
     1152 *
     1153 * @param   expr            The expression to evaluate.
     1154 * @param   DetailsArgs     Argument list for RTTestIFailureDetails, including
     1155 *                          parenthesis.
     1156 * @param   rcRet           What to return on failure.
     1157 */
     1158#define RTTESTI_CHECK_MSG_BREAK(expr, DetailsArgs) \
     1159    if (!(expr)) { \
     1160        RTTestIFailed("line %u: %s", __LINE__, #expr); \
     1161        RTTestIFailureDetails DetailsArgs; \
     1162        break; \
     1163    } else do {} while (0)
    11471164/** @def RTTESTI_CHECK_MSG_RET
    11481165 * Check whether a boolean expression holds true, returns on false.
     
    11811198    } while (0)
    11821199
    1183 
    11841200/** @def RTTESTI_CHECK_RC
    11851201 * Check whether an expression returns a specific IPRT style status code.
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