dd: use assert! instead of if then panic!
@@ -35,13 +35,12 @@ fn unimplemented_flags_should_error_non_linux() {
}
}
- if !succeeded.is_empty() {
- panic!(
+ assert!(
+ succeeded.is_empty(),
"The following flags did not panic as expected: {:?}",
succeeded
);
}
-}
#[test]
fn unimplemented_flags_should_error() {
@@ -64,13 +63,12 @@ fn unimplemented_flags_should_error() {
}
}
- if !succeeded.is_empty() {
- panic!(
+ assert!(
+ succeeded.is_empty(),
"The following flags did not panic as expected: {:?}",
succeeded
);
}
-}
#[test]
fn test_status_level_absent() {
