From 9266edbf92f0e0d1f8b5cf430ca3c86c1999f4c7 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 29 Aug 2024 16:20:10 -0700 Subject: [PATCH] forgot to test zero... --- fixed_wide/src/tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fixed_wide/src/tests.rs b/fixed_wide/src/tests.rs index 26ec4f3..61e6b96 100644 --- a/fixed_wide/src/tests.rs +++ b/fixed_wide/src/tests.rs @@ -20,6 +20,11 @@ fn test_sqrt(){ assert_eq!(a.sqrt(),I32F32::from(2)); } #[test] +fn test_sqrt_zero(){ + let a=I32F32::ZERO; + assert_eq!(a.sqrt(),I32F32::ZERO); +} +#[test] fn test_sqrt_low(){ let a=I32F32::HALF; let b=a*a;