parent
9d6f4e5eea
commit
6411aef609
1 changed files with 8 additions and 1 deletions
|
|
@ -326,7 +326,14 @@ pub fn test_main_static(tests: &[TestDescAndFn]) {
|
|||
/// test is considered a failure. By default, invokes `report()`
|
||||
/// and checks for a `0` result.
|
||||
pub fn assert_test_result<T: Termination>(result: T) {
|
||||
assert_eq!(result.report(), 0);
|
||||
let code = result.report();
|
||||
assert_eq!(
|
||||
code,
|
||||
0,
|
||||
"the test returned a termination value with a non-zero status code ({}) \
|
||||
which indicates a failure",
|
||||
code
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue