@@ -19,7 +19,6 @@ pub enum TestResult {
19
19
TrFailed ,
20
20
TrFailedMsg ( String ) ,
21
21
TrIgnored ,
22
- TrAllowedFail ,
23
22
TrBench ( BenchSamples ) ,
24
23
TrTimedFail ,
25
24
}
@@ -42,8 +41,6 @@ pub fn calc_result<'a>(
42
41
43
42
if maybe_panic_str. map ( |e| e. contains ( msg) ) . unwrap_or ( false ) {
44
43
TestResult :: TrOk
45
- } else if desc. allow_fail {
46
- TestResult :: TrAllowedFail
47
44
} else if let Some ( panic_str) = maybe_panic_str {
48
45
TestResult :: TrFailedMsg ( format ! (
49
46
r#"panic did not contain expected string
@@ -64,7 +61,6 @@ pub fn calc_result<'a>(
64
61
( & ShouldPanic :: Yes , Ok ( ( ) ) ) | ( & ShouldPanic :: YesWithMessage ( _) , Ok ( ( ) ) ) => {
65
62
TestResult :: TrFailedMsg ( "test did not panic as expected" . to_string ( ) )
66
63
}
67
- _ if desc. allow_fail => TestResult :: TrAllowedFail ,
68
64
_ => TestResult :: TrFailed ,
69
65
} ;
70
66
@@ -90,11 +86,10 @@ pub fn get_result_from_exit_code(
90
86
time_opts : & Option < time:: TestTimeOptions > ,
91
87
exec_time : & Option < time:: TestExecTime > ,
92
88
) -> TestResult {
93
- let result = match ( desc. allow_fail , code) {
94
- ( _, TR_OK ) => TestResult :: TrOk ,
95
- ( true , TR_FAILED ) => TestResult :: TrAllowedFail ,
96
- ( false , TR_FAILED ) => TestResult :: TrFailed ,
97
- ( _, _) => TestResult :: TrFailedMsg ( format ! ( "got unexpected return code {}" , code) ) ,
89
+ let result = match code {
90
+ TR_OK => TestResult :: TrOk ,
91
+ TR_FAILED => TestResult :: TrFailed ,
92
+ _ => TestResult :: TrFailedMsg ( format ! ( "got unexpected return code {}" , code) ) ,
98
93
} ;
99
94
100
95
// If test is already failed (or allowed to fail), do not change the result.
0 commit comments