Changeset 16542 in vbox
- Timestamp:
- Feb 6, 2009 11:11:51 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/include/iprt/assert.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r15668 r16542 2246 2246 #endif 2247 2247 2248 /** @def AssertForEach 2249 * Equivalent to Assert for each value of the variable from the starting 2250 * value to the finishing one. 2251 * 2252 * @param var Name of the counter variable 2253 * @param vartype Type of the counter variable 2254 * @param first Lowest inclusive value of the counter variable. This must 2255 * be free from side effects. 2256 * @param last Highest exclusive value of the counter variable. This 2257 * must be free from side effects. 2258 * @param expr Expression which should be true for each value of @a var. 2259 * @param name Name of the precondition 2260 */ 2261 #define AssertForEach(var, vartype, first, last, expr) \ 2262 do { \ 2263 vartype var; \ 2264 Assert(((first) == (first)) && ((last) == (last))); /* partial check for side effects */ \ 2265 for (var = (first); var < (last); ++var) \ 2266 AssertMsg(expr, ("%s = %lld", #var, var)); \ 2267 } while(0) 2268 2248 2269 /** @} */ 2249 2270
Note:
See TracChangeset
for help on using the changeset viewer.

