diff --git a/src/pasta/fp.rs b/src/pasta/fp.rs index 6735c32f..c6cdcf0a 100644 --- a/src/pasta/fp.rs +++ b/src/pasta/fp.rs @@ -28,3 +28,19 @@ impl_from_u64!(Fp); impl_from_bool!(Fp); field_bits!(Fp); serialize_deserialize_primefield!(Fp); + +#[cfg(test)] +mod test { + + use super::Fp; + use crate::{ + arith_test, constants_test, from_uniform_bytes_test, legendre_test, serde_test, test, + }; + + constants_test!(Fp); + arith_test!(Fp); + legendre_test!(Fp); + test!(arith, Fp, sqrt_test, 1000); + serde_test!(Fp PrimeFieldBits); + from_uniform_bytes_test!(Fp, 1000, L 64, L 48); +} diff --git a/src/pasta/fq.rs b/src/pasta/fq.rs index a06e2592..d6384e3c 100644 --- a/src/pasta/fq.rs +++ b/src/pasta/fq.rs @@ -28,3 +28,18 @@ impl_from_u64!(Fq); impl_from_bool!(Fq); field_bits!(Fq); serialize_deserialize_primefield!(Fq); + +#[cfg(test)] +mod test { + use super::Fq; + use crate::{ + arith_test, constants_test, from_uniform_bytes_test, legendre_test, serde_test, test, + }; + + constants_test!(Fq); + arith_test!(Fq); + legendre_test!(Fq); + test!(arith, Fq, sqrt_test, 1000); + serde_test!(Fq PrimeFieldBits); + from_uniform_bytes_test!(Fq, 1000, L 64, L 48); +} diff --git a/src/pasta/pallas.rs b/src/pasta/pallas.rs index 9332e7a4..a251d865 100644 --- a/src/pasta/pallas.rs +++ b/src/pasta/pallas.rs @@ -19,7 +19,7 @@ use crate::{ new_curve_impl!( (pub), Pallas, - PastaAffine, + PallasAffine, Fp, Fq, (- Fp::ONE, Fp::from_raw([2,0,0,0])),