Skip to content

Commit 00111c9

Browse files
committed
tests: add missing fe comparison checks for inverse field test cases
`check_fe_equal` is a wrapper around `secp256k1_fe_equal` that takes care of normalization. Since it doesn't check anything itself, the CHECK macro is needed at the call-sites to actually ensure equality.
1 parent 0653a25 commit 00111c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3618,9 +3618,9 @@ static void run_inverse_tests(void)
36183618
for (i = 0; (size_t)i < sizeof(fe_cases)/sizeof(fe_cases[0]); ++i) {
36193619
for (var = 0; var <= 1; ++var) {
36203620
test_inverse_field(&x_fe, &fe_cases[i][0], var);
3621-
check_fe_equal(&x_fe, &fe_cases[i][1]);
3621+
CHECK(check_fe_equal(&x_fe, &fe_cases[i][1]));
36223622
test_inverse_field(&x_fe, &fe_cases[i][1], var);
3623-
check_fe_equal(&x_fe, &fe_cases[i][0]);
3623+
CHECK(check_fe_equal(&x_fe, &fe_cases[i][0]));
36243624
}
36253625
}
36263626
for (i = 0; (size_t)i < sizeof(scalar_cases)/sizeof(scalar_cases[0]); ++i) {

0 commit comments

Comments
 (0)