Catch up with algebra (#106)

Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
Marcin
2022-07-29 21:16:16 +02:00
committed by GitHub
parent 76579d0fbb
commit 93e64df895
120 changed files with 934 additions and 1653 deletions

View File

@@ -1,29 +1,17 @@
use ark_algebra_test_templates::{
curves::{curve_tests, sw_tests},
groups::group_test,
};
use ark_algebra_test_templates::curves::{curve_tests, sw_tests};
use ark_ec::AffineCurve;
use ark_std::{rand::Rng, test_rng};
use crate::{Affine, PallasParameters, Projective};
use crate::{G1Affine, G1Projective, PallasParameters};
#[test]
fn test_projective_curve() {
curve_tests::<Projective>();
curve_tests::<G1Projective>();
sw_tests::<PallasParameters>();
}
#[test]
fn test_projective_group() {
let mut rng = test_rng();
let a: Projective = rng.gen();
let b: Projective = rng.gen();
group_test(a, b);
}
#[test]
fn test_generator() {
let generator = Affine::prime_subgroup_generator();
let generator = G1Affine::prime_subgroup_generator();
assert!(generator.is_on_curve());
assert!(generator.is_in_correct_subgroup_assuming_on_curve());
}