tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
This commit is contained in:
parent
45b6468d7e
commit
4a19668c37
11
src/tests.c
11
src/tests.c
|
@ -3115,6 +3115,17 @@ void test_ge(void) {
|
||||||
ge_equals_gej(&ge[i], &gej[i]);
|
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(ge);
|
||||||
free(gej);
|
free(gej);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue