summaryrefslogtreecommitdiff
path: root/test/test.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-18 12:04:29 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-18 12:05:15 +0000
commite99e643ed1f2856109426f791a7615ee122d7c42 (patch)
treefaf740cbb284796d24209349b22872248467d112 /test/test.h
parentb6924161108214b4e50c25f4168564ead4000430 (diff)
tests: Avoid dependence on undefined C
Right-shifting by a negative value is undefined. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test/test.h')
-rw-r--r--test/test.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test.h b/test/test.h
index 7ef4dca4..3cd94576 100644
--- a/test/test.h
+++ b/test/test.h
@@ -120,4 +120,7 @@ double test_timer_stop(struct test_display *t, struct timespec *tv);
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#endif
+#define REPS(I) (1 << (I))
+#define SETS(I) ((I) < 12 ? 1 << (12 - (I)) : 2)
+
#endif