arnaucube
arnaucube/ark-r1cs-stdPublic Self-hosted repository
Update r1cs-std tests
Pratyush Mishra pratyushmishra@berkeley.edu
Mon, 12 Aug 2019 17:41:23 -0700
commit

c610ecbcc536f3a978298265f222da0999e32dc7

parent

e00d667330ff359275d1b2b483616996a6fd61cf

M r1cs-std/src/bits/boolean.rs → r1cs-std/src/bits/boolean.rs

@@ -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};
M r1cs-std/src/bits/uint8.rs → r1cs-std/src/bits/uint8.rs

@@ -292,9 +292,7 @@

#[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;
M r1cs-std/src/fields/mod.rs → r1cs-std/src/fields/mod.rs

@@ -215,10 +215,7 @@ #[cfg(test)]

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;
M r1cs-std/src/groups/curves/short_weierstrass/bls12/bls12_377.rs → r1cs-std/src/groups/curves/short_weierstrass/bls12/bls12_377.rs

@@ -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,
M r1cs-std/src/groups/curves/twisted_edwards/test.rs → r1cs-std/src/groups/curves/twisted_edwards/test.rs

@@ -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},
M r1cs-std/src/groups/mod.rs → r1cs-std/src/groups/mod.rs

@@ -146,7 +146,7 @@ use algebra::Field;

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;
M r1cs-std/src/lib.rs → r1cs-std/src/lib.rs

@@ -64,6 +64,7 @@ pub use crate::select::*;

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}; }
M r1cs-std/src/pairing/mod.rs → r1cs-std/src/pairing/mod.rs

@@ -58,7 +58,7 @@

#[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 @@ };

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;