Skip to content

Commit 9f1d8a2

Browse files
Don't actually CHECK in tests in COVERAGE mode
1 parent a46773a commit 9f1d8a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/util.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ static SECP256K1_INLINE void secp256k1_callback_call(const secp256k1_callback *
2525
cb->fn(text, (void*)cb->data);
2626
}
2727

28-
#ifdef DETERMINISTIC
28+
#if defined(COVERAGE)
29+
/* Do nothing in COVERAGE mode. This will make the compiler optimize away the actual branch,
30+
and we get useful branch coverage within our test files. */
31+
#define TEST_FAILURE(msg)
32+
#elif defined(DETERMINISTIC)
2933
#define TEST_FAILURE(msg) do { \
3034
fprintf(stderr, "%s\n", msg); \
3135
abort(); \

0 commit comments

Comments
 (0)