diff options
| author | Matt Brubeck <mbrubeck@limpet.net> | 2011-11-01 10:31:23 -0700 |
|---|---|---|
| committer | Matt Brubeck <mbrubeck@limpet.net> | 2011-11-01 16:55:39 -0700 |
| commit | 76077a9fb7f67a8af1b2eb16c2814ca703ad6c97 (patch) | |
| tree | 5093785e88259f901a94c9199f6908053d4841ca /src/compiletest | |
| parent | eabc9f229574a906437dd63359caec1c15fb75ad (diff) | |
Add should_fail annotation for unit tests
This allows test cases to assert that a function is expected to fail. Tests annotated with "should_fail" will succeed only if the function fails.
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/compiletest.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index aa77febd228..a582aa57b0d 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -170,7 +170,8 @@ fn make_test(cx: cx, testfile: str, configport: port<[u8]>) -> test::test_desc<fn@()> { {name: make_test_name(cx.config, testfile), fn: make_test_closure(testfile, chan(configport)), - ignore: header::is_test_ignored(cx.config, testfile)} + ignore: header::is_test_ignored(cx.config, testfile), + should_fail: false} } fn make_test_name(config: config, testfile: str) -> str { |
