summaryrefslogtreecommitdiff
path: root/test/birdtest.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/birdtest.h')
-rw-r--r--test/birdtest.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/birdtest.h b/test/birdtest.h
index cfeebb98..540092d6 100644
--- a/test/birdtest.h
+++ b/test/birdtest.h
@@ -37,6 +37,10 @@ int bt_test_suite_base(int (*test_fn)(const void *), const char *test_id, const
static inline u64 bt_random(void)
{ return ((u64) random() & 0xffffffff) | ((u64) random() << 32); }
+static inline u32 bt_random_n(u32 max)
+{ return random() % max; }
+
+
void bt_log_suite_result(int result, const char *fmt, ...);
void bt_log_suite_case_result(int result, const char *fmt, ...);