about summary refs log tree commit diff
path: root/library/test/src/test_result.rs
AgeCommit message (Collapse)AuthorLines
2025-04-28Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`Lieselotte-5/+4
2025-04-14Report span of test when should_panic test failedxizheyin-1/+6
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-08libtest: Pass the test's panic payload as Option instead of ResultZalathar-7/+14
Passing a `Result<(), &dyn Any>` to `calc_result` requires awkward code at both call sites, for no real benefit. It's much easier to just pass the payload as `Option<&dyn Any>`. No functional change, except that the owned payload is dropped slightly later.
2025-01-20test: add `#![warn(unreachable_pub)]`Urgau-3/+3
2024-10-08Change a few `&Option<T>` into `Option<&T>`Yuri Astrakhan-4/+4
2024-07-29Reformat `use` declarations.Nicholas Nethercote-4/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-15Update name of Windows abort constant to match platform documentationCharles Celerier-2/+2
2024-07-15Add match arm for Fuchsia status code upon an abort in a testCharles Celerier-0/+11
This change adds ZX_TASK_RETCODE_EXCEPTION_KILL as an expected status code upon an abort in a test on Fuchsia. Tests fixes #127539
2024-01-30Actually abort in panic-abort-testsTyler Mandry-7/+29
2023-01-03Fix a few clippy lints in libtestJoshua Nelson-2/+2
- Remove unnecessary references and dereferences - Use `.contains` instead of `a <= x && x <= b` - Use `mem::take` instead of `mem::replace` where possible
2022-12-19Fix `uninlined_format_args` in libtestnils-3/+2
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-1/+1
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-01-28remove allow_fail test flagyuhaixin.hx-9/+4
2021-02-19Remove unsafe impl Send for CompletedTest & TestResultTomasz Miąsko-2/+0
2021-01-10Print failure message on all tests that should panic, but don'tjohanngan-1/+1
This already happens with should_panic tests without an expected message. This commit fixes should_panic tests with an expected message to have the same behavior.
2020-07-27mv std libs to library/mark-0/+115