diff --git a/src/modes/mod.rs b/src/modes/mod.rs index 4b38077..a29dd89 100644 --- a/src/modes/mod.rs +++ b/src/modes/mod.rs @@ -11,3 +11,22 @@ pub enum Footstool { pub trait Hand { fn footstool(&self, other: Self) -> Footstool; } + +mod tests { + use super::*; + pub fn test_non_reflexivity( + x: &T, + y: &T, + ) -> (Footstool, Footstool) { + let res1 = x.footstool(*y); + let res2 = y.footstool(*x); + assert!(match (res1, res2) { + (Footstool::None, Footstool::None) + | (Footstool::None, Footstool::Half) + | (Footstool::Half, Footstool::None) + | (Footstool::Full, Footstool::Full) => true, + _ => false, + }); + (res1, res2) + } +}