@@ -2323,15 +2323,15 @@ impl<'test> TestCx<'test> {
23232323 & normalized_stdout,
23242324 & proc_res. stdout ,
23252325 & expected_stdout,
2326- ) ;
2326+ ) as usize ;
23272327 }
23282328 if !self . props . dont_check_compiler_stderr {
23292329 errors += self . compare_output (
23302330 stderr_kind,
23312331 & normalized_stderr,
23322332 & stderr,
23332333 & expected_stderr,
2334- ) ;
2334+ ) as usize ;
23352335 }
23362336 }
23372337 TestOutput :: Run => {
@@ -2340,9 +2340,10 @@ impl<'test> TestCx<'test> {
23402340 & normalized_stdout,
23412341 & proc_res. stdout ,
23422342 & expected_stdout,
2343- ) ;
2343+ ) as usize ;
23442344 errors +=
2345- self . compare_output ( stderr_kind, & normalized_stderr, & stderr, & expected_stderr) ;
2345+ self . compare_output ( stderr_kind, & normalized_stderr, & stderr, & expected_stderr)
2346+ as usize ;
23462347 }
23472348 }
23482349 errors
@@ -2570,21 +2571,22 @@ impl<'test> TestCx<'test> {
25702571 }
25712572 }
25722573
2574+ // Returns `true` if output differed and was not blessed
25732575 fn compare_output (
25742576 & self ,
25752577 stream : & str ,
25762578 actual : & str ,
25772579 actual_unnormalized : & str ,
25782580 expected : & str ,
2579- ) -> usize {
2581+ ) -> bool {
25802582 let are_different = match ( self . force_color_svg ( ) , expected. find ( '\n' ) , actual. find ( '\n' ) ) {
25812583 // FIXME: We ignore the first line of SVG files
25822584 // because the width parameter is non-deterministic.
25832585 ( true , Some ( nl_e) , Some ( nl_a) ) => expected[ nl_e..] != actual[ nl_a..] ,
25842586 _ => expected != actual,
25852587 } ;
25862588 if !are_different {
2587- return 0 ;
2589+ return false ;
25882590 }
25892591
25902592 // Wrapper tools set by `runner` might provide extra output on failure,
@@ -2600,7 +2602,7 @@ impl<'test> TestCx<'test> {
26002602 used. retain ( |line| actual_lines. contains ( line) ) ;
26012603 // check if `expected` contains a subset of the lines of `actual`
26022604 if used. len ( ) == expected_lines. len ( ) && ( expected. is_empty ( ) == actual. is_empty ( ) ) {
2603- return 0 ;
2605+ return false ;
26042606 }
26052607 if expected_lines. is_empty ( ) {
26062608 // if we have no lines to check, force a full overwite
@@ -2659,7 +2661,7 @@ impl<'test> TestCx<'test> {
26592661
26602662 println ! ( "\n The actual {0} differed from the expected {0}." , stream) ;
26612663
2662- if self . config . bless { 0 } else { 1 }
2664+ if self . config . bless { false } else { true }
26632665 }
26642666
26652667 /// Returns whether to show the full stderr/stdout.
0 commit comments