forked from StrafesNET/strafe-client
add test
This commit is contained in:
parent
e47b1ff6f9
commit
1841077e49
@ -314,3 +314,22 @@ pub fn push_solve(contacts:&Vec<Contact>,point:Planar64Vec3)->Option<Planar64Vec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests{
|
||||
use super::*;
|
||||
#[test]
|
||||
fn test_push_solve(){
|
||||
let contacts=vec![
|
||||
Contact{
|
||||
position:Planar64Vec3::ZERO,
|
||||
velocity:Planar64Vec3::Y,
|
||||
normal:Planar64Vec3::Y,
|
||||
}
|
||||
];
|
||||
assert_eq!(
|
||||
Some(Planar64Vec3::ZERO),
|
||||
push_solve(&contacts,Planar64Vec3::NEG_Y)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user