We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d6f4e5 commit 6411aefCopy full SHA for 6411aef
src/libtest/lib.rs
@@ -326,7 +326,14 @@ pub fn test_main_static(tests: &[TestDescAndFn]) {
326
/// test is considered a failure. By default, invokes `report()`
327
/// and checks for a `0` result.
328
pub fn assert_test_result<T: Termination>(result: T) {
329
- assert_eq!(result.report(), 0);
+ let code = result.report();
330
+ assert_eq!(
331
+ code,
332
+ 0,
333
+ "the test returned a termination value with a non-zero status code ({}) \
334
+ which indicates a failure",
335
+ code
336
+ );
337
}
338
339
#[derive(Copy, Clone, Debug)]
0 commit comments