From b05aca07898f5dfb16a860bff8d8cbc8c337c8cf Mon Sep 17 00:00:00 2001 From: SpontanCombust <61706594+SpontanCombust@users.noreply.github.com> Date: Fri, 3 Nov 2023 04:32:43 +0100 Subject: [PATCH] test default debug formatting --- tests/tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/tests.rs b/tests/tests.rs index 2925810..cd90f00 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -353,5 +353,11 @@ mod tests { assert_eq!(format!("{:?}", BitmaskDebugAsVec::Flag12), "[Flag1, Flag2, Flag12]"); assert_eq!(format!("{:?}", BitmaskDebugAsVec::Flag3), "[Flag3]"); assert_eq!(format!("{:?}", BitmaskDebugAsVec::full()), "[Flag1, Flag2, Flag12, Flag3]"); + + assert_eq!(format!("{:?}", Bitmask::none()), "Bitmask { bits: 0 }"); + assert_eq!(format!("{:?}", Bitmask::Flag1), "Bitmask { bits: 1 }"); + assert_eq!(format!("{:?}", Bitmask::Flag2), "Bitmask { bits: 2 }"); + assert_eq!(format!("{:?}", Bitmask::Flag1.or(Bitmask::Flag2)), "Bitmask { bits: 3 }"); + assert_eq!(format!("{:?}", Bitmask::Flag3), "Bitmask { bits: 4 }"); } }