mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-23 12:13:48 +01:00
Upgrade ff-fft, gm17, and r1cs-std
This commit is contained in:
@@ -739,7 +739,9 @@ mod test {
|
||||
prelude::*
|
||||
};
|
||||
use algebra::{fields::bls12_381::Fr, BitIterator, Field, PrimeField};
|
||||
use rand::{Rand, SeedableRng, XorShiftRng};
|
||||
use algebra::UniformRand;
|
||||
use rand::SeedableRng;
|
||||
use rand_xorshift::XorShiftRng;
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use std::str::FromStr;
|
||||
|
||||
@@ -1736,7 +1738,7 @@ mod test {
|
||||
assert!(!cs.is_satisfied());
|
||||
}
|
||||
|
||||
let mut rng = XorShiftRng::from_seed([0x3dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let r = Fr::rand(&mut rng);
|
||||
|
||||
@@ -340,12 +340,13 @@ mod test {
|
||||
use super::UInt32;
|
||||
use crate::{bits::boolean::Boolean, test_constraint_system::TestConstraintSystem};
|
||||
use algebra::fields::{bls12_381::Fr, Field};
|
||||
use rand::{Rng, SeedableRng, XorShiftRng};
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
#[test]
|
||||
fn test_uint32_from_bits() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0653]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let v = (0..32)
|
||||
@@ -377,7 +378,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint32_xor() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0653]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let mut cs = TestConstraintSystem::<Fr>::new();
|
||||
@@ -419,7 +420,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint32_addmany_constants() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let mut cs = TestConstraintSystem::<Fr>::new();
|
||||
@@ -454,7 +455,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint32_addmany() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let mut cs = TestConstraintSystem::<Fr>::new();
|
||||
@@ -505,7 +506,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint32_rotr() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
let mut num = rng.gen();
|
||||
|
||||
|
||||
@@ -294,7 +294,8 @@ mod test {
|
||||
use super::UInt8;
|
||||
use crate::{prelude::*, test_constraint_system::TestConstraintSystem};
|
||||
use algebra::fields::bls12_381::Fr;
|
||||
use rand::{Rng, SeedableRng, XorShiftRng};
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
use r1cs_core::ConstraintSystem;
|
||||
|
||||
#[test]
|
||||
@@ -323,7 +324,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint8_from_bits() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0653]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let v = (0..8)
|
||||
@@ -355,7 +356,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_uint8_xor() {
|
||||
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0653]);
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
|
||||
for _ in 0..1000 {
|
||||
let mut cs = TestConstraintSystem::<Fr>::new();
|
||||
|
||||
Reference in New Issue
Block a user