Following up on feedback from #1819, this PR deduplicates the hardcoded constants for the group order minus one (n-1) and the field prime minus one (p-1) within src/tests.c.
Changes:
- Defined
scalar_n_m1andfe_p_m1as global static constants at the top of the file. - Replaced all hardcoded hex occurrences of these values in:
test_scalar_check_overflowrun_scalar_tests(HALF_TESTS)scalar_cmov_testscalar_casesandfe_casesarrays- Local
scalar_minus_oneandfe_minus_onedefinitions.
- Verified that
make checkpasses all tests.