Changeset 16545 in vbox for trunk/include/iprt/assert.h
- Timestamp:
- Feb 6, 2009 12:17:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r16542 r16545 2250 2250 * value to the finishing one. 2251 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 must2255 * be free from side effects.2256 * @param last Highest exclusive value of the counter variable. This2257 * must be free from side effects.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. 2255 * This must be free from side effects. 2256 * @param end Highest exclusive value of the counter variable. 2257 * This must be free from side effects. 2258 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) 2259 */ 2260 #define AssertForEach(var, vartype, first, end, expr) \ 2261 do { \ 2262 vartype var; \ 2263 Assert((first) == (first) && (end) == (end)); /* partial check for side effects */ \ 2264 for (var = (first); var < (end); var++) \ 2265 AssertMsg(expr, ("%s = %#RX64 (%RI64)", #var, (uint64_t)var, (int64_t)var)); \ 2266 } while (0) 2268 2267 2269 2268 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.