Lines Matching refs:expr

165 #define EXPECT_ZR(cond, expr)				\  argument
166 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_zr(expr, llen); } while (0)
169 int expect_zr(int expr, int llen) in expect_zr() argument
171 int ret = !(expr == 0); in expect_zr()
173 llen += printf(" = %d ", expr); in expect_zr()
179 #define EXPECT_NZ(cond, expr, val) \ argument
180 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_nz(expr, llen; } while (0)
183 int expect_nz(int expr, int llen) in expect_nz() argument
185 int ret = !(expr != 0); in expect_nz()
187 llen += printf(" = %d ", expr); in expect_nz()
193 #define EXPECT_EQ(cond, expr, val) \ argument
194 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_eq(expr, llen, val); } while (0)
197 int expect_eq(uint64_t expr, int llen, uint64_t val) in expect_eq() argument
199 int ret = !(expr == val); in expect_eq()
201 llen += printf(" = %lld ", (long long)expr); in expect_eq()
207 #define EXPECT_NE(cond, expr, val) \ argument
208 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ne(expr, llen, val); } while (0)
211 int expect_ne(int expr, int llen, int val) in expect_ne() argument
213 int ret = !(expr != val); in expect_ne()
215 llen += printf(" = %d ", expr); in expect_ne()
221 #define EXPECT_GE(cond, expr, val) \ argument
222 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ge(expr, llen, val); } while (0)
225 int expect_ge(int expr, int llen, int val) in expect_ge() argument
227 int ret = !(expr >= val); in expect_ge()
229 llen += printf(" = %d ", expr); in expect_ge()
235 #define EXPECT_GT(cond, expr, val) \ argument
236 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_gt(expr, llen, val); } while (0)
239 int expect_gt(int expr, int llen, int val) in expect_gt() argument
241 int ret = !(expr > val); in expect_gt()
243 llen += printf(" = %d ", expr); in expect_gt()
249 #define EXPECT_LE(cond, expr, val) \ argument
250 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_le(expr, llen, val); } while (0)
253 int expect_le(int expr, int llen, int val) in expect_le() argument
255 int ret = !(expr <= val); in expect_le()
257 llen += printf(" = %d ", expr); in expect_le()
263 #define EXPECT_LT(cond, expr, val) \ argument
264 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_lt(expr, llen, val); } while (0)
267 int expect_lt(int expr, int llen, int val) in expect_lt() argument
269 int ret = !(expr < val); in expect_lt()
271 llen += printf(" = %d ", expr); in expect_lt()
277 #define EXPECT_SYSZR(cond, expr) \ argument
278 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syszr(expr, llen); } while (0)
281 int expect_syszr(int expr, int llen) in expect_syszr() argument
285 if (expr) { in expect_syszr()
287 llen += printf(" = %d %s ", expr, errorname(errno)); in expect_syszr()
290 llen += printf(" = %d ", expr); in expect_syszr()
297 #define EXPECT_SYSEQ(cond, expr, val) \ argument
298 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syseq(expr, llen, val); } while (0)
301 int expect_syseq(int expr, int llen, int val) in expect_syseq() argument
305 if (expr != val) { in expect_syseq()
307 llen += printf(" = %d %s ", expr, errorname(errno)); in expect_syseq()
310 llen += printf(" = %d ", expr); in expect_syseq()
317 #define EXPECT_SYSNE(cond, expr, val) \ argument
318 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_sysne(expr, llen, val); } while (0)
321 int expect_sysne(int expr, int llen, int val) in expect_sysne() argument
325 if (expr == val) { in expect_sysne()
327 llen += printf(" = %d %s ", expr, errorname(errno)); in expect_sysne()
330 llen += printf(" = %d ", expr); in expect_sysne()
337 #define EXPECT_SYSER2(cond, expr, expret, experr1, experr2) \ argument
338 …do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2…
340 #define EXPECT_SYSER(cond, expr, expret, experr) \ argument
341 EXPECT_SYSER2(cond, expr, expret, experr, 0)
344 int expect_syserr2(int expr, int expret, int experr1, int experr2, int llen) in expect_syserr2() argument
349 llen += printf(" = %d %s ", expr, errorname(_errno)); in expect_syserr2()
350 if (expr != expret || (_errno != experr1 && _errno != experr2)) { in expect_syserr2()
364 #define EXPECT_PTRZR(cond, expr) \ argument
365 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrzr(expr, llen); } while (0)
368 int expect_ptrzr(const void *expr, int llen) in expect_ptrzr() argument
372 llen += printf(" = <%p> ", expr); in expect_ptrzr()
373 if (expr) { in expect_ptrzr()
383 #define EXPECT_PTRNZ(cond, expr) \ argument
384 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrnz(expr, llen); } while (0)
387 int expect_ptrnz(const void *expr, int llen) in expect_ptrnz() argument
391 llen += printf(" = <%p> ", expr); in expect_ptrnz()
392 if (!expr) { in expect_ptrnz()
401 #define EXPECT_PTREQ(cond, expr, cmp) \ argument
402 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptreq(expr, llen, cmp); } while (0)
405 int expect_ptreq(const void *expr, int llen, const void *cmp) in expect_ptreq() argument
409 llen += printf(" = <%p> ", expr); in expect_ptreq()
410 if (expr != cmp) { in expect_ptreq()
419 #define EXPECT_PTRNE(cond, expr, cmp) \ argument
420 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrne(expr, llen, cmp); } while (0)
423 int expect_ptrne(const void *expr, int llen, const void *cmp) in expect_ptrne() argument
427 llen += printf(" = <%p> ", expr); in expect_ptrne()
428 if (expr == cmp) { in expect_ptrne()
437 #define EXPECT_PTRGE(cond, expr, cmp) \ argument
438 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrge(expr, llen, cmp); } while (0)
441 int expect_ptrge(const void *expr, int llen, const void *cmp) in expect_ptrge() argument
443 int ret = !(expr >= cmp); in expect_ptrge()
445 llen += printf(" = <%p> ", expr); in expect_ptrge()
450 #define EXPECT_PTRGT(cond, expr, cmp) \ argument
451 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrgt(expr, llen, cmp); } while (0)
454 int expect_ptrgt(const void *expr, int llen, const void *cmp) in expect_ptrgt() argument
456 int ret = !(expr > cmp); in expect_ptrgt()
458 llen += printf(" = <%p> ", expr); in expect_ptrgt()
464 #define EXPECT_PTRLE(cond, expr, cmp) \ argument
465 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrle(expr, llen, cmp); } while (0)
468 int expect_ptrle(const void *expr, int llen, const void *cmp) in expect_ptrle() argument
470 int ret = !(expr <= cmp); in expect_ptrle()
472 llen += printf(" = <%p> ", expr); in expect_ptrle()
478 #define EXPECT_PTRLT(cond, expr, cmp) \ argument
479 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrlt(expr, llen, cmp); } while (0)
482 int expect_ptrlt(const void *expr, int llen, const void *cmp) in expect_ptrlt() argument
484 int ret = !(expr < cmp); in expect_ptrlt()
486 llen += printf(" = <%p> ", expr); in expect_ptrlt()
491 #define EXPECT_PTRER2(cond, expr, expret, experr1, experr2) \ argument
492 …do { if (!(cond)) result(llen, SKIPPED); else ret += expect_ptrerr2(expr, expret, experr1, experr2…
494 #define EXPECT_PTRER(cond, expr, expret, experr) \ argument
495 EXPECT_PTRER2(cond, expr, expret, experr, 0)
498 int expect_ptrerr2(const void *expr, const void *expret, int experr1, int experr2, int llen) in expect_ptrerr2() argument
503 llen += printf(" = <%p> %s ", expr, errorname(_errno)); in expect_ptrerr2()
504 if (expr != expret || (_errno != experr1 && _errno != experr2)) { in expect_ptrerr2()
517 #define EXPECT_STRZR(cond, expr) \ argument
518 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_strzr(expr, llen); } while (0)
521 int expect_strzr(const char *expr, int llen) in expect_strzr() argument
525 llen += printf(" = <%s> ", expr); in expect_strzr()
526 if (expr) { in expect_strzr()
536 #define EXPECT_STRNZ(cond, expr) \ argument
537 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_strnz(expr, llen); } while (0)
540 int expect_strnz(const char *expr, int llen) in expect_strnz() argument
544 llen += printf(" = <%s> ", expr); in expect_strnz()
545 if (!expr) { in expect_strnz()
555 #define EXPECT_STREQ(cond, expr, cmp) \ argument
556 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_streq(expr, llen, cmp); } while (0)
559 int expect_streq(const char *expr, int llen, const char *cmp) in expect_streq() argument
563 llen += printf(" = <%s> ", expr); in expect_streq()
564 if (strcmp(expr, cmp) != 0) { in expect_streq()
574 #define EXPECT_STRNE(cond, expr, cmp) \ argument
575 do { if (!(cond)) result(llen, SKIPPED); else ret += expect_strne(expr, llen, cmp); } while (0)
578 int expect_strne(const char *expr, int llen, const char *cmp) in expect_strne() argument
582 llen += printf(" = <%s> ", expr); in expect_strne()
583 if (strcmp(expr, cmp) == 0) { in expect_strne()