@@ -35,6 +35,7 @@ pub use cli::TestOpts;
3535pub use self :: ColorConfig :: * ;
3636pub use self :: bench:: { Bencher , black_box} ;
3737pub use self :: console:: run_tests_console;
38+ pub use self :: formatters:: TestGroupKind ;
3839pub use self :: options:: { ColorConfig , Options , OutputFormat , RunIgnored , ShouldPanic } ;
3940pub use self :: types:: TestName :: * ;
4041pub use self :: types:: * ;
@@ -327,6 +328,19 @@ where
327328 if !opts. bench_benchmarks {
328329 filtered_tests = convert_benchmarks_to_tests ( filtered_tests) ;
329330 }
331+ let group_kind = match filtered_tests. get ( 0 ) . map ( |x| x. desc . test_type ) {
332+ // if all remaining tests are the same kind of doctest, we will print a different message.
333+ Some ( ty @ TestType :: DocTest { merged } )
334+ if filtered_tests. iter ( ) . all ( |t| t. desc . test_type == ty) =>
335+ {
336+ if merged {
337+ TestGroupKind :: DocTestMerged
338+ } else {
339+ TestGroupKind :: DocTestStandalone
340+ }
341+ }
342+ _ => TestGroupKind :: Regular ,
343+ } ;
330344
331345 for test in filtered_tests {
332346 let mut desc = test. desc ;
@@ -348,7 +362,7 @@ where
348362
349363 let shuffle_seed = get_shuffle_seed ( opts) ;
350364
351- let event = TestEvent :: TeFiltered ( filtered. total_len ( ) , shuffle_seed) ;
365+ let event = TestEvent :: TeFiltered ( filtered. total_len ( ) , shuffle_seed, group_kind ) ;
352366 notify_about_test_event ( event) ?;
353367
354368 let concurrency = opts. test_threads . unwrap_or_else ( get_concurrency) ;
0 commit comments