rust/library/test/src
bors 3740ba2a7d Auto merge of #84863 - ABouttefeux:libtest, r=m-ou-se
Show test type during prints

Test output can sometimes be confusing. For example doctest with the no_run argument are displayed the same way than test that are run.

During #83857 I got the feedback that test output can be confusing.

For the moment test output is
```
test $DIR/test-type.rs - f (line 12) ... ignored
test $DIR/test-type.rs - f (line 15) ... ok
test $DIR/test-type.rs - f (line 21) ... ok
test $DIR/test-type.rs - f (line 6) ... ok
```

I propose to change output by indicating the test type as
```
test $DIR/test-type.rs - f (line 12) ... ignored
test $DIR/test-type.rs - f (line 15) - compile ... ok
test $DIR/test-type.rs - f (line 21) - compile fail ... ok
test $DIR/test-type.rs - f (line 6) ... ok
```
by indicating the test type after the test name (and in the case of doctest after the function name and line) and before the "...".

------------

Note: this is a proof of concept, the implementation is probably not optimal as the properties added in `TestDesc` are only use in the display and does not represent actual change of behavior, maybe `TestType::DocTest` could have fields
2021-06-06 09:13:59 +00:00
..
formatters Auto merge of #84863 - ABouttefeux:libtest, r=m-ou-se 2021-06-06 09:13:59 +00:00
helpers lazily calls some fns 2021-03-27 10:20:32 +03:00
stats mv std libs to library/ 2020-07-27 19:51:13 -05:00
bench.rs move core::hint::black_box under its own feature gate 2021-04-25 11:08:12 +02:00
cli.rs feat(libtest): Add JUnit formatter 2021-04-25 15:51:50 -07:00
console.rs feat(libtest): Add JUnit formatter 2021-04-25 15:51:50 -07:00
event.rs libtest: Index tests by a unique TestId 2021-03-24 23:08:13 -07:00
lib.rs rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
options.rs feat(libtest): Add JUnit formatter 2021-04-25 15:51:50 -07:00
stats.rs Fix some clippy issues 2020-10-01 01:34:38 -04:00
test_result.rs Remove unsafe impl Send for CompletedTest & TestResult 2021-02-19 00:00:00 +00:00
tests.rs add bootstrap cfg 2021-05-09 13:37:09 +02:00
time.rs Dogfood 'str_split_once()` in the std lib 2020-12-07 14:24:05 -07:00
types.rs change based on review 2021-05-18 18:18:28 +02:00