mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-27 22:23:48 +01:00
Catch up with algebra (#106)
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user