@@ -19,7 +19,6 @@ pub enum TestResult {
1919 TrFailed ,
2020 TrFailedMsg ( String ) ,
2121 TrIgnored ,
22- TrAllowedFail ,
2322 TrBench ( BenchSamples ) ,
2423 TrTimedFail ,
2524}
@@ -42,8 +41,6 @@ pub fn calc_result<'a>(
4241
4342 if maybe_panic_str. map ( |e| e. contains ( msg) ) . unwrap_or ( false ) {
4443 TestResult :: TrOk
45- } else if desc. allow_fail {
46- TestResult :: TrAllowedFail
4744 } else if let Some ( panic_str) = maybe_panic_str {
4845 TestResult :: TrFailedMsg ( format ! (
4946 r#"panic did not contain expected string
@@ -64,7 +61,6 @@ pub fn calc_result<'a>(
6461 ( & ShouldPanic :: Yes , Ok ( ( ) ) ) | ( & ShouldPanic :: YesWithMessage ( _) , Ok ( ( ) ) ) => {
6562 TestResult :: TrFailedMsg ( "test did not panic as expected" . to_string ( ) )
6663 }
67- _ if desc. allow_fail => TestResult :: TrAllowedFail ,
6864 _ => TestResult :: TrFailed ,
6965 } ;
7066
@@ -90,11 +86,10 @@ pub fn get_result_from_exit_code(
9086 time_opts : & Option < time:: TestTimeOptions > ,
9187 exec_time : & Option < time:: TestExecTime > ,
9288) -> 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) ) ,
9893 } ;
9994
10095 // If test is already failed (or allowed to fail), do not change the result.
0 commit comments