tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs

This commit is contained in:
Tim Ruffing authored and roconnor-blockstream committed 2021-05-05 13:07:25 -04:00
1 parent 45b6468d7e
commit 4a19668c37
1 file changed
+11
+11
View File
@@ -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);
}