Skip to content

Commit a1d52e3

Browse files
committed
tests: remove unnecessary test in run_ec_pubkey_parse_test
This test tested whether setting the callback works correctly which should be tested in the context tests.
1 parent 875b0ad commit a1d52e3

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/tests.c

-8
Original file line numberDiff line numberDiff line change
@@ -5983,7 +5983,6 @@ static void run_ec_pubkey_parse_test(void) {
59835983
size_t len;
59845984
int32_t i;
59855985
int32_t ecount;
5986-
int32_t ecount2;
59875986
ecount = 0;
59885987
/* Nothing should be reading this far into pubkeyc. */
59895988
SECP256K1_CHECKMEM_UNDEFINE(&pubkeyc[65], 1);
@@ -6104,15 +6103,8 @@ static void run_ec_pubkey_parse_test(void) {
61046103
CHECK(len == 65);
61056104
/* Multiple illegal args. Should still set arg error only once. */
61066105
ecount = 0;
6107-
ecount2 = 11;
61086106
CHECK(secp256k1_ec_pubkey_parse(CTX, NULL, NULL, 65) == 0);
61096107
CHECK(ecount == 1);
6110-
/* Does the illegal arg callback actually change the behavior? */
6111-
secp256k1_context_set_illegal_callback(CTX, uncounting_illegal_callback_fn, &ecount2);
6112-
CHECK(secp256k1_ec_pubkey_parse(CTX, NULL, NULL, 65) == 0);
6113-
CHECK(ecount == 1);
6114-
CHECK(ecount2 == 10);
6115-
secp256k1_context_set_illegal_callback(CTX, NULL, NULL);
61166108
/* Try a bunch of prefabbed points with all possible encodings. */
61176109
for (i = 0; i < SECP256K1_EC_PARSE_TEST_NVALID; i++) {
61186110
ec_pubkey_parse_pointtest(valid[i], 1, 1);

0 commit comments

Comments
 (0)