about summary refs log tree commit diff
path: root/src/test/run-fail/test-should-fail-bad-message.rs
AgeCommit message (Collapse)AuthorLines
2020-05-06Move tests from `test/run-fail` to UIYuki Okushi-10/+0
2018-12-25Remove licensesMark Rousskov-10/+0
2016-10-18Fix some pretty printing testsVadim Petrochenkov-1/+0
2016-09-30TidyBrian Anderson-1/+1
2016-09-30Adding ignore-emscripten to failing tests.Ross Schulman-0/+1
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2014-12-18Revise std::thread API to join by defaultAaron Turon-3/+1
This commit is part of a series that introduces a `std::thread` API to replace `std::task`. In the new API, `spawn` returns a `JoinGuard`, which by default will join the spawned thread when dropped. It can also be used to join explicitly at any time, returning the thread's result. Alternatively, the spawned thread can be explicitly detached (so no join takes place). As part of this change, Rust processes now terminate when the main thread exits, even if other detached threads are still running, moving Rust closer to standard threading models. This new behavior may break code that was relying on the previously implicit join-all. In addition to the above, the new thread API also offers some built-in support for building blocking abstractions in user space; see the module doc for details. Closes #18000 [breaking-change]
2014-12-06Change from message to expectedSteven Fackler-1/+1
2014-12-06Allow message specification for should_failSteven Fackler-0/+22
The test harness will make sure that the panic message contains the specified string. This is useful to help make `#[should_fail]` tests a bit less brittle by decreasing the chance that the test isn't "accidentally" passing due to a panic occurring earlier than expected. The behavior is in some ways similar to JUnit's `expected` feature: `@Test(expected=NullPointerException.class)`. Without the message assertion, this test would pass even though it's not actually reaching the intended part of the code: ```rust #[test] #[should_fail(message = "out of bounds")] fn test_oob_array_access() { let idx: uint = from_str("13o").unwrap(); // oops, this will panic [1i32, 2, 3][idx]; } ```