add tests

This commit is contained in:
Quaternions 2024-08-28 12:17:00 -07:00
parent 0be0dd5c6f
commit 8aa7da6be7
2 changed files with 17 additions and 0 deletions

View File

@ -9,3 +9,6 @@ pub mod typenum{
mod fixed_wide_traits;
#[cfg(feature="fixed_wide_traits")]
pub use ::fixed_wide_traits::wide;
#[cfg(test)]
mod tests;

14
fixed_wide/src/tests.rs Normal file
View File

@ -0,0 +1,14 @@
use fixed_wide_traits::wide::WideMul;
#[test]
fn test_wide_mul(){
let a=crate::types::I32F32::ONE;
let aa=a.wide_mul(a);
assert_eq!(aa,crate::types::I64F64::ONE);
}
#[test]
fn test_bint(){
let a=crate::types::I32F32::ONE;
assert_eq!(a*2,crate::types::I32F32::from(2));
}