Module ff_group_tests::prime_field
source · Expand description
Tests for the PrimeField and PrimeFieldBits traits.
Functions§
- Test CAPACITY is accurate.
- Test char_le_bits returns the bits of the modulus.
- Test DELTA is correct.
- Test encoding and decoding of field elements.
- Test
From<u64>
for F works. - Test from_u128 for F works.
- Test the inverted constants are correct.
- Test is_odd/is_even works.
- Test NUM_BITS is accurate.
- Test one returns F::from(1).
- Perform basic tests on the pow functions, even when passed non-canonical inputs.
- Run all tests on fields implementing PrimeField.
- Run all tests on fields implementing PrimeFieldBits.
- Test the root of unity is correct for the provided multiplicative generator.
- Test S is correct.
- Test to_le_bits returns the little-endian bits of a value.
- Test zero returns F::from(0).