Skip to content

Commit

Permalink
tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random authored and roconnor-blockstream committed May 5, 2021
1 parent 45b6468 commit 4a19668
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -3115,6 +3115,17 @@ void test_ge(void) {
ge_equals_gej(&ge[i], &gej[i]);
}

/* Test batch gej -> ge conversion with all infinities. */
for (i = 0; i < 4 * runs + 1; i++) {
secp256k1_gej_set_infinity(&gej[i]);
}
/* batch convert */
secp256k1_ge_set_all_gej_var(ge, gej, 4 * runs + 1);
/* check result */
for (i = 0; i < 4 * runs + 1; i++) {
CHECK(secp256k1_ge_is_infinity(&ge[i]));
}

free(ge);
free(gej);
}
Expand Down

0 comments on commit 4a19668

Please sign in to comment.