diff --git a/mvpoly/tests/prime.rs b/mvpoly/tests/prime.rs index 7a8aa045f0..8e74ad6200 100644 --- a/mvpoly/tests/prime.rs +++ b/mvpoly/tests/prime.rs @@ -247,3 +247,19 @@ fn test_mul_by_const() { p2[0] = c; assert_eq!(p2 * p1.clone(), p1.clone().mul_by_const(c)) } + +#[test] +fn test_mul_by_const_with_zero() { + let mut rng = o1_utils::tests::make_test_rng(None); + let p1 = Dense::::random(&mut rng); + let c = Fp::zero(); + assert_eq!(p1.mul_by_const(c), Dense::::zero()) +} + +#[test] +fn test_mul_by_const_with_one() { + let mut rng = o1_utils::tests::make_test_rng(None); + let p1 = Dense::::random(&mut rng); + let c = Fp::one(); + assert_eq!(p1.mul_by_const(c), p1) +}