1
Fork 0

rename should-panic to should-fail, per acrichto's suggestion

This commit is contained in:
Niko Matsakis 2016-03-02 14:20:55 -05:00
parent 0d6b4e0386
commit ad3ed80503
4 changed files with 8 additions and 8 deletions

View file

@ -42,7 +42,7 @@ whole, instead of just a few lines inside the test.
* `ignore-test` always ignores the test * `ignore-test` always ignores the test
* `ignore-lldb` and `ignore-gdb` will skip the debuginfo tests * `ignore-lldb` and `ignore-gdb` will skip the debuginfo tests
* `min-{gdb,lldb}-version` * `min-{gdb,lldb}-version`
* `should-panic` indicates that the test should fail; used for "meta testing", * `should-fail` indicates that the test should fail; used for "meta testing",
where we test the compiletest program itself to check that it will generate where we test the compiletest program itself to check that it will generate
errors in appropriate scenarios errors in appropriate scenarios

View file

@ -359,7 +359,7 @@ pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn
desc: test::TestDesc { desc: test::TestDesc {
name: make_test_name(config, testpaths), name: make_test_name(config, testpaths),
ignore: early_props.ignore, ignore: early_props.ignore,
should_panic: if early_props.should_panic { should_panic: if early_props.should_fail {
test::ShouldPanic::Yes test::ShouldPanic::Yes
} else { } else {
test::ShouldPanic::No test::ShouldPanic::No

View file

@ -179,7 +179,7 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path, cfg: Option<&str>
pub struct EarlyProps { pub struct EarlyProps {
pub ignore: bool, pub ignore: bool,
pub should_panic: bool, pub should_fail: bool,
} }
// scan the file to detect whether the test should be ignored and // scan the file to detect whether the test should be ignored and
@ -188,7 +188,7 @@ pub struct EarlyProps {
pub fn early_props(config: &Config, testfile: &Path) -> EarlyProps { pub fn early_props(config: &Config, testfile: &Path) -> EarlyProps {
let mut props = EarlyProps { let mut props = EarlyProps {
ignore: false, ignore: false,
should_panic: false, should_fail: false,
}; };
iter_header(testfile, None, &mut |ln| { iter_header(testfile, None, &mut |ln| {
@ -206,9 +206,9 @@ pub fn early_props(config: &Config, testfile: &Path) -> EarlyProps {
ignore_gdb(config, ln) || ignore_gdb(config, ln) ||
ignore_lldb(config, ln); ignore_lldb(config, ln);
props.should_panic = props.should_fail =
props.should_panic || props.should_fail ||
parse_name_directive(ln, "should-panic"); parse_name_directive(ln, "should-fail");
}); });
return props; return props;

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
// revisions: a // revisions: a
// should-panic // should-fail
// pretty-expanded FIXME #23616 // pretty-expanded FIXME #23616
// This is a "meta-test" of the compilertest framework itself. In // This is a "meta-test" of the compilertest framework itself. In