rust/src/compiletest
Steven Fackler 616af6eb83 Allow message specification for should_fail
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];
}
```
2014-12-06 15:13:48 -08:00
..
common.rs Switch to purely namespaced enums 2014-11-17 07:35:51 -08:00
compiletest.rs Allow message specification for should_fail 2014-12-06 15:13:48 -08:00
errors.rs compiletest: extend syntax with support for choosing same line as previous line. 2014-11-24 13:19:26 +01:00
header.rs Move FromStr to core::str 2014-11-16 12:41:55 +11:00
procsrv.rs
runtest.rs Fixes to the roll-up 2014-11-23 15:23:39 -05:00
util.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00