mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-09 23:41:33 +01:00
Update r1cs-std tests
This commit is contained in:
@@ -736,7 +736,7 @@ mod test {
|
||||
use super::{AllocatedBit, Boolean};
|
||||
use crate::{
|
||||
test_constraint_system::TestConstraintSystem,
|
||||
utils::{AllocGadget, ConditionalEqGadget, EqGadget, ToBytesGadget},
|
||||
prelude::*
|
||||
};
|
||||
use algebra::{fields::bls12_381::Fr, BitIterator, Field, PrimeField};
|
||||
use rand::{Rand, SeedableRng, XorShiftRng};
|
||||
|
||||
@@ -292,9 +292,7 @@ impl<ConstraintF: Field> AllocGadget<u8, ConstraintF> for UInt8 {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::UInt8;
|
||||
use crate::{
|
||||
bits::boolean::Boolean, test_constraint_system::TestConstraintSystem, utils::AllocGadget,
|
||||
};
|
||||
use crate::{prelude::*, test_constraint_system::TestConstraintSystem};
|
||||
use algebra::fields::bls12_381::Fr;
|
||||
use rand::{Rng, SeedableRng, XorShiftRng};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
@@ -215,10 +215,7 @@ pub trait FieldGadget<F: Field, ConstraintF: Field>:
|
||||
mod test {
|
||||
use rand::{self, thread_rng, Rand, SeedableRng, XorShiftRng};
|
||||
|
||||
use super::FieldGadget;
|
||||
use crate::{
|
||||
bits::boolean::Boolean, test_constraint_system::TestConstraintSystem, utils::AllocGadget,
|
||||
};
|
||||
use crate::{prelude::*, test_constraint_system::TestConstraintSystem};
|
||||
use algebra::{fields::Field, BitIterator};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
|
||||
@@ -12,16 +12,10 @@ pub type G2PreparedGadget = Bls12G2PreparedGadget<Bls12_377Parameters>;
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::fields::FieldGadget;
|
||||
use rand;
|
||||
|
||||
use super::{G1Gadget, G2Gadget};
|
||||
use crate::{
|
||||
boolean::Boolean,
|
||||
groups::GroupGadget,
|
||||
test_constraint_system::TestConstraintSystem,
|
||||
utils::{AllocGadget, CondSelectGadget, EqGadget},
|
||||
};
|
||||
use crate::{test_constraint_system::TestConstraintSystem, prelude::*};
|
||||
use algebra::{
|
||||
curves::bls12_377::{G1Projective as G1, G2Projective as G2},
|
||||
fields::bls12_377::Fr,
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
use rand;
|
||||
|
||||
use crate::{
|
||||
boolean::Boolean,
|
||||
groups::{test::group_test, GroupGadget},
|
||||
utils::{AllocGadget, CondSelectGadget},
|
||||
};
|
||||
use crate::{prelude::*, groups::test::group_test};
|
||||
|
||||
use algebra::{
|
||||
curves::{models::TEModelParameters, twisted_edwards_extended::GroupAffine as TEAffine},
|
||||
|
||||
@@ -146,7 +146,7 @@ mod test {
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
use crate::{
|
||||
groups::GroupGadget, test_constraint_system::TestConstraintSystem, utils::AllocGadget,
|
||||
prelude::*, test_constraint_system::TestConstraintSystem,
|
||||
};
|
||||
use algebra::groups::Group;
|
||||
use rand;
|
||||
|
||||
@@ -64,6 +64,7 @@ pub mod prelude {
|
||||
pub use crate::alloc::*;
|
||||
pub use crate::fields::FieldGadget;
|
||||
pub use crate::groups::GroupGadget;
|
||||
pub use crate::pairing::PairingGadget;
|
||||
pub use crate::bits::{ToBitsGadget, ToBytesGadget, boolean::Boolean, uint8::UInt8, uint32::UInt32};
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ pub trait PairingGadget<PairingE: PairingEngine, ConstraintF: Field> {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
// use rand;
|
||||
use crate::{boolean::Boolean, test_constraint_system::TestConstraintSystem};
|
||||
use crate::test_constraint_system::TestConstraintSystem;
|
||||
use algebra::{BitIterator, Field};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
@@ -71,10 +71,8 @@ mod test {
|
||||
|
||||
use super::bls12_377::PairingGadget;
|
||||
use crate::{
|
||||
fields::FieldGadget,
|
||||
groups::bls12::bls12_377::{G1Gadget, G1PreparedGadget, G2Gadget, G2PreparedGadget},
|
||||
pairing::PairingGadget as _,
|
||||
utils::{AllocGadget, EqGadget},
|
||||
prelude::*, pairing::PairingGadget as _,
|
||||
};
|
||||
use algebra::curves::bls12_377::{Bls12_377, G1Projective, G2Projective};
|
||||
use std::ops::Mul;
|
||||
|
||||
Reference in New Issue
Block a user