Signed/unsigned comparisons in tests.
This commit is contained in:
parent
850562e3f1
commit
3276e7d4e2
12
src/tests.c
12
src/tests.c
|
@ -502,13 +502,13 @@ void run_field_inv_all(void) {
|
|||
secp256k1_fe_inv_all(0, xi, x);
|
||||
for (int i=0; i<count; i++) {
|
||||
size_t len = (secp256k1_rand32() & 15) + 1;
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
random_fe_non_zero(&x[j]);
|
||||
secp256k1_fe_inv_all(len, xi, x);
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
CHECK(check_fe_inverse(&x[j], &xi[j]));
|
||||
secp256k1_fe_inv_all(len, xii, xi);
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
CHECK(check_fe_equal(&x[j], &xii[j]));
|
||||
}
|
||||
}
|
||||
|
@ -519,13 +519,13 @@ void run_field_inv_all_var(void) {
|
|||
secp256k1_fe_inv_all_var(0, xi, x);
|
||||
for (int i=0; i<count; i++) {
|
||||
size_t len = (secp256k1_rand32() & 15) + 1;
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
random_fe_non_zero(&x[j]);
|
||||
secp256k1_fe_inv_all_var(len, xi, x);
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
CHECK(check_fe_inverse(&x[j], &xi[j]));
|
||||
secp256k1_fe_inv_all_var(len, xii, xi);
|
||||
for (int j=0; j<len; j++)
|
||||
for (size_t j=0; j<len; j++)
|
||||
CHECK(check_fe_equal(&x[j], &xii[j]));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue