From 4c3ac6053f4493a3f6306c67ae067bd195a0e41b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 31 Aug 2017 07:45:29 -0700 Subject: [PATCH] Test the error case of condcode parsing. --- lib/cretonne/src/ir/condcodes.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cretonne/src/ir/condcodes.rs b/lib/cretonne/src/ir/condcodes.rs index f63bd60938..26d81ede6e 100644 --- a/lib/cretonne/src/ir/condcodes.rs +++ b/lib/cretonne/src/ir/condcodes.rs @@ -303,6 +303,7 @@ mod tests { let cc = *r; assert_eq!(cc.to_string().parse(), Ok(cc)); } + assert_eq!("bogus".parse::(), Err(())); } static FLOAT_ALL: [FloatCC; 14] = [FloatCC::Ordered, @@ -345,5 +346,6 @@ mod tests { let cc = *r; assert_eq!(cc.to_string().parse(), Ok(cc)); } + assert_eq!("bogus".parse::(), Err(())); } }