test in mkeymap does not need #[should_panic]

This commit is contained in:
Tyler Ruckinger 2019-06-25 19:51:12 -04:00
parent 83b0ab5064
commit a5e3e62bef
2 changed files with 7 additions and 8 deletions

View file

@ -292,7 +292,7 @@ mod tests {
}
#[test]
#[should_panic]
// #[should_panic(expected = "Len changed")]
fn insert_duplicate_value() {
let mut map: MKeyMap = MKeyMap::new();
@ -302,11 +302,11 @@ mod tests {
map.insert(Long(OsString::from("Two")), Arg::with_name("Value1"));
assert_eq!(map.args.len(), orig_len);
assert_eq!(
map.get(&Long(OsString::from("One"))),
map.get(&Long(OsString::from("Two")))
);
assert_eq!(map.args.len(), orig_len + 1/* , "Len changed" */);
// assert_eq!(
// map.get(&Long(OsString::from("One"))),
// map.get(&Long(OsString::from("Two")))
// );
}
// #[test]

View file

@ -543,8 +543,7 @@ ARGS:
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
";
-V, --version Prints version information";