5

Github Show test type during prints by ABouttefeux · Pull Request #84863 · rust-...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/84863
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

ABouttefeux commented on May 3

edited by m-ou-se

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK