]> git.lizzy.rs Git - enumset.git/commitdiff
Fix tests on 1.31
authorLymia Aluysia <lymia@lymiahugs.com>
Wed, 1 Apr 2020 16:22:22 +0000 (09:22 -0700)
committerLymia Aluysia <lymia@lymiahugs.com>
Wed, 1 Apr 2020 16:22:22 +0000 (09:22 -0700)
enumset/tests/ops.rs

index 4776064fbb517029bc0d1db4388a99d01ba612da..e82ad640bd8e749ee969251c30ccc22500fbd9da 100644 (file)
@@ -308,7 +308,7 @@ pub enum ThresholdEnum {
 }
 macro_rules! bits_tests {
     (
-        $mod_name:ident, $threshold_expr:expr, ($($too_big_expr:expr)?), $ty:ty,
+        $mod_name:ident, $threshold_expr:expr, ($($too_big_expr:expr),*), $ty:ty,
         $to:ident $try_to:ident $to_truncated:ident
         $from:ident $try_from:ident $from_truncated:ident
     ) => {
@@ -347,7 +347,7 @@ macro_rules! bits_tests {
                         let set: EnumSet<ThresholdEnum> = $too_big_expr.into();
                         assert!(set.$try_to().is_none());
                 }
-            )?
+            )*
 
             #[test]
             fn truncated_overflow() {
@@ -356,7 +356,7 @@ macro_rules! bits_tests {
                 $(
                     let set: EnumSet<ThresholdEnum> = $too_big_expr | A;
                     assert_eq!(2, set.$to_truncated());
-                )?
+                )*
             }
         }
     }