Signed/unsigned comparisons in tests.

This commit is contained in:
Gregory Maxwell 2014-11-12 15:24:49 -08:00
parent 850562e3f1
commit 3276e7d4e2
1 changed files with 6 additions and 6 deletions

View File

@ -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]));
}
}