You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
530 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. use ark_algebra_test_templates::*;
  2. use ark_ff::fields::{models::fp6_2over3::*, quadratic_extension::QuadExtConfig};
  3. use ark_std::{rand::Rng, test_rng};
  4. use crate::*;
  5. test_field!(fr; Fr; mont_prime_field);
  6. test_field!(fq; Fq; mont_prime_field);
  7. test_field!(fq3; Fq3);
  8. test_field!(fq6; Fq6);
  9. #[test]
  10. fn test_fq3_more() {
  11. let mut rng = test_rng();
  12. let mut a: Fq3 = rng.gen();
  13. assert_eq!(
  14. a * Fq6Config::NONRESIDUE,
  15. *<Fp6ConfigWrapper<Fq6Config>>::mul_base_field_by_nonresidue_in_place(&mut a)
  16. );
  17. }