diff --git a/crates/proof-of-sql/src/base/slice_ops/inner_product_test.rs b/crates/proof-of-sql/src/base/slice_ops/inner_product_test.rs index 3c9978b4f..39d0c1858 100644 --- a/crates/proof-of-sql/src/base/slice_ops/inner_product_test.rs +++ b/crates/proof-of-sql/src/base/slice_ops/inner_product_test.rs @@ -1,5 +1,5 @@ use super::*; -use crate::base::scalar::{test_scalar::TestScalar, Curve25519Scalar}; +use crate::base::scalar::test_scalar::TestScalar; #[test] fn test_inner_product() { @@ -36,22 +36,22 @@ fn test_inner_product_scalar_uneven() { assert_eq!(TestScalar::from(8u64), inner_product(&a, &b)); } -/// test inner product with curve25519scalar +/// test inner product with TestScalar #[test] -fn test_inner_product_curve25519scalar() { - let a = vec![Curve25519Scalar::from(1u64), Curve25519Scalar::from(2u64)]; - let b = vec![Curve25519Scalar::from(2u64), Curve25519Scalar::from(3u64)]; - assert_eq!(Curve25519Scalar::from(8u64), inner_product(&a, &b)); +fn test_inner_product_testscalar() { + let a = vec![TestScalar::from(1u64), TestScalar::from(2u64)]; + let b = vec![TestScalar::from(2u64), TestScalar::from(3u64)]; + assert_eq!(TestScalar::from(8u64), inner_product(&a, &b)); } -/// test uneven inner product with curve25519scalars +/// test uneven inner product with TestScalar #[test] -fn test_inner_product_curve25519scalar_uneven() { - let a = vec![Curve25519Scalar::from(1u64), Curve25519Scalar::from(2u64)]; +fn test_inner_product_testscalar_uneven() { + let a = vec![TestScalar::from(1u64), TestScalar::from(2u64)]; let b = vec![ - Curve25519Scalar::from(2u64), - Curve25519Scalar::from(3u64), - Curve25519Scalar::from(4u64), + TestScalar::from(2u64), + TestScalar::from(3u64), + TestScalar::from(4u64), ]; - assert_eq!(Curve25519Scalar::from(8u64), inner_product(&a, &b)); + assert_eq!(TestScalar::from(8u64), inner_product(&a, &b)); } diff --git a/crates/proof-of-sql/src/base/slice_ops/mul_add_assign_test.rs b/crates/proof-of-sql/src/base/slice_ops/mul_add_assign_test.rs index 5e50c2956..8bbbf4802 100644 --- a/crates/proof-of-sql/src/base/slice_ops/mul_add_assign_test.rs +++ b/crates/proof-of-sql/src/base/slice_ops/mul_add_assign_test.rs @@ -31,9 +31,9 @@ fn test_mul_add_assign_uneven_panic() { mul_add_assign(&mut a, 10, &b); } -/// test [`mul_add_assign`] with curve25519scalar +/// test [`mul_add_assign`] with TestScalar #[test] -fn test_mul_add_assign_curve25519scalar() { +fn test_mul_add_assign_testscalar() { let mut a = vec![TestScalar::from(1u64), TestScalar::from(2u64)]; let b = vec![TestScalar::from(2u64), TestScalar::from(3u64)]; mul_add_assign(&mut a, TestScalar::from(10u64), &b); @@ -44,9 +44,9 @@ fn test_mul_add_assign_curve25519scalar() { assert_eq!(a, c); } -/// test [`mul_add_assign`] with uneven curve25519scalars +/// test [`mul_add_assign`] with uneven TestScalar #[test] -fn test_mul_add_assign_curve25519scalar_uneven() { +fn test_mul_add_assign_testscalar_uneven() { let mut a = vec![ TestScalar::from(1u64), TestScalar::from(2u64), diff --git a/crates/proof-of-sql/src/base/slice_ops/slice_cast_test.rs b/crates/proof-of-sql/src/base/slice_ops/slice_cast_test.rs index 1f0b04583..d6013ee0a 100644 --- a/crates/proof-of-sql/src/base/slice_ops/slice_cast_test.rs +++ b/crates/proof-of-sql/src/base/slice_ops/slice_cast_test.rs @@ -39,25 +39,25 @@ fn test_slice_cast_with_random() { assert_eq!(a, b); } -/// random test casting from integer to curve25519scalar +/// random test casting from integer to TestScalar #[test] -fn test_slice_cast_with_random_from_integer_to_curve25519scalar() { +fn test_slice_cast_with_random_from_integer_to_testscalar() { use rand::Rng; let mut rng = rand::thread_rng(); let a: Vec = (0..100).map(|_| rng.gen()).collect(); - let b: Vec = a.iter().map(|&x| Curve25519Scalar::from(x)).collect(); - let a: Vec = slice_cast_with(&a, |&x| Curve25519Scalar::from(x)); + let b: Vec = a.iter().map(|&x| TestScalar::from(x)).collect(); + let a: Vec = slice_cast_with(&a, |&x| TestScalar::from(x)); assert_eq!(a, b); } -/// random test auto casting from integer to curve25519scalar +/// random test auto casting from integer to TestScalar #[test] -fn test_slice_cast_random_from_integer_to_curve25519scalar() { +fn test_slice_cast_random_from_integer_to_testscalar() { use rand::Rng; let mut rng = rand::thread_rng(); let a: Vec = (0..100).map(|_| rng.gen()).collect(); - let b: Vec = a.iter().map(|&x| Curve25519Scalar::from(x)).collect(); - let a: Vec = slice_cast(&a); + let b: Vec = a.iter().map(|&x| TestScalar::from(x)).collect(); + let a: Vec = slice_cast(&a); assert_eq!(a, b); }