From 1aecc70750ee6ce9c96ebf3e6b4a7fb322ff8ca3 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 17 Dec 2024 19:18:21 -0700 Subject: Build the full matrix of CMAKE_BUILD_TYPE --- libmisc/tests/test_rand.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmisc/tests/test_rand.c') diff --git a/libmisc/tests/test_rand.c b/libmisc/tests/test_rand.c index 282c6a4..8076155 100644 --- a/libmisc/tests/test_rand.c +++ b/libmisc/tests/test_rand.c @@ -14,6 +14,7 @@ /* Intercept failures *********************************************************/ +#ifndef NDEBUG jmp_buf *__catch; void __lm_abort(void) { @@ -34,6 +35,7 @@ void __lm_abort(void) { __catch = old_catch; \ } \ } while (0); +#endif /* Actual tests ***************************************************************/ @@ -42,7 +44,11 @@ void __lm_abort(void) { static void test_n(uint64_t cnt) { if (cnt == 0 || cnt > UINT64_C(1)<<63) { +#ifndef NDEBUG should_abort(rand_uint63n(cnt)); +#else + return; +#endif } else { double sum = 0; bool seen[MAX_SEE_ALL] = {0}; -- cgit v1.2.3-2-g168b