tests: add CHECK_ERROR_VOID and use it in scratch tests

This commit is contained in:
Jonas Nick
2023-07-31 13:19:31 +00:00
parent f8d7ea68df
commit 70303643cf
2 changed files with 32 additions and 39 deletions

View File

@@ -132,7 +132,7 @@ static void test_xonly_pubkey_comparison(void) {
CHECK_ILLEGAL_VOID(CTX, CHECK(secp256k1_xonly_pubkey_cmp(CTX, &pk1, &pk2) < 0));
{
int32_t ecount = 0;
secp256k1_context_set_illegal_callback(CTX, counting_illegal_callback_fn, &ecount);
secp256k1_context_set_illegal_callback(CTX, counting_callback_fn, &ecount);
CHECK(secp256k1_xonly_pubkey_cmp(CTX, &pk1, &pk1) == 0);
CHECK(ecount == 2);
secp256k1_context_set_illegal_callback(CTX, NULL, NULL);