add tests
This commit is contained in:
parent
0be0dd5c6f
commit
8aa7da6be7
@ -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
14
fixed_wide/src/tests.rs
Normal 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));
|
||||
}
|
Loading…
Reference in New Issue
Block a user