1
Fork 0

Include ignore message in libtest output

As an example:

    #[test]
    #[ignore = "not yet implemented"]
    fn test_ignored() {
        ...
    }

Will now render as:

    running 2 tests
    test tests::test_ignored ... ignored, not yet implemented

    test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
This commit is contained in:
Antonio Yang 2022-01-10 14:01:12 +08:00 committed by Mark Rousskov
parent 3d127e2040
commit bb3b5574cd
7 changed files with 90 additions and 2 deletions

View file

@ -329,6 +329,10 @@ impl<'a> ExtCtxt<'a> {
self.expr_call_global(sp, some, vec![expr])
}
pub fn expr_none(&self, sp: Span) -> P<ast::Expr> {
let none = self.std_path(&[sym::option, sym::Option, sym::None]);
self.expr_path(self.path_global(sp, none))
}
pub fn expr_tuple(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
self.expr(sp, ast::ExprKind::Tup(exprs))
}