rust/src/test
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
..
auxiliary Fix xcrate enum namespacing 2014-11-25 11:02:47 -08:00
bench rollup merge of #19416: sfackler/global-stdin 2014-12-05 10:06:52 -08:00
codegen
compile-fail rollup merge of #19553: sfackler/issue-19543 2014-12-05 10:08:33 -08:00
compile-fail-fulldeps Adjust some error messages to start with a lowercase letter and not finish with a full stop 2014-11-30 20:26:53 +13:00
debuginfo gdb: Fix pretty printer for nullable-opt enums with fat pointers. 2014-12-02 18:28:43 -05:00
pretty syntax: Make asm! clobbers a proper vector. 2014-11-30 11:58:23 +09:00
run-fail Allow message specification for should_fail 2014-12-06 15:13:48 -08:00
run-make Fix various references in late-running tests and things 2014-12-05 01:52:18 -05:00
run-pass Allow message specification for should_fail 2014-12-06 15:13:48 -08:00
run-pass-fulldeps test: Ignore issue-19501 pretty for now 2014-12-03 09:22:13 -08:00
run-pass-valgrind