mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
dd: use assert! instead of if then panic!
This commit is contained in:
parent
6aee05a0f1
commit
548a5121ae
1 changed files with 10 additions and 12 deletions
|
@ -35,12 +35,11 @@ fn unimplemented_flags_should_error_non_linux() {
|
|||
}
|
||||
}
|
||||
|
||||
if !succeeded.is_empty() {
|
||||
panic!(
|
||||
"The following flags did not panic as expected: {:?}",
|
||||
succeeded
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
succeeded.is_empty(),
|
||||
"The following flags did not panic as expected: {:?}",
|
||||
succeeded
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -64,12 +63,11 @@ fn unimplemented_flags_should_error() {
|
|||
}
|
||||
}
|
||||
|
||||
if !succeeded.is_empty() {
|
||||
panic!(
|
||||
"The following flags did not panic as expected: {:?}",
|
||||
succeeded
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
succeeded.is_empty(),
|
||||
"The following flags did not panic as expected: {:?}",
|
||||
succeeded
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue