File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl<T: Write> PrettyFormatter<T> {
169169
170170 fn write_test_name ( & mut self , desc : & TestDesc ) -> io:: Result < ( ) > {
171171 let name = desc. padded_name ( self . max_name_len , desc. name . padding ( ) ) ;
172- self . write_plain ( & format ! ( "test {} {} ... " , name, desc. test_mode_string( ) ) ) ?;
172+ self . write_plain ( & format ! ( "test {} - {} ... " , name, desc. test_mode_string( ) ) ) ?;
173173
174174 Ok ( ( ) )
175175 }
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ impl<T: Write> TerseFormatter<T> {
158158
159159 fn write_test_name ( & mut self , desc : & TestDesc ) -> io:: Result < ( ) > {
160160 let name = desc. padded_name ( self . max_name_len , desc. name . padding ( ) ) ;
161- self . write_plain ( & format ! ( "test {} {} ... " , name, desc. test_mode_string( ) ) ) ?;
161+ self . write_plain ( & format ! ( "test {} - {} ... " , name, desc. test_mode_string( ) ) ) ?;
162162
163163 Ok ( ( ) )
164164 }
Original file line number Diff line number Diff line change @@ -143,26 +143,26 @@ impl TestDesc {
143143 }
144144 }
145145
146- pub fn test_mode_string ( & self ) -> String {
146+ pub fn test_mode_string ( & self ) -> & ' static str {
147147 if self . ignore {
148- return "ignore" . to_string ( ) ;
148+ return & "ignore" ;
149149 }
150150 match self . should_panic {
151151 options:: ShouldPanic :: Yes | options:: ShouldPanic :: YesWithMessage ( _) => {
152- return "should panic" . to_string ( ) ;
152+ return & "should panic" ;
153153 }
154- _ => { }
154+ options :: ShouldPanic :: No => { }
155155 }
156156 if self . allow_fail {
157- return "allow fail" . to_string ( ) ;
157+ return & "allow fail" ;
158158 }
159159 if self . compile_fail {
160- return "compile fail" . to_string ( ) ;
160+ return & "compile fail" ;
161161 }
162162 if self . no_run {
163- return "compile" . to_string ( ) ;
163+ return & "compile" ;
164164 }
165- "run" . to_string ( )
165+ & "run"
166166 }
167167}
168168
You can’t perform that action at this time.
0 commit comments