From ad3ed805030a128d83349cbf3c2dfab15c8a61a7 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 2 Mar 2016 14:20:55 -0500 Subject: [PATCH] rename should-panic to should-fail, per acrichto's suggestion --- COMPILER_TESTS.md | 2 +- src/compiletest/compiletest.rs | 2 +- src/compiletest/header.rs | 10 +++++----- src/test/compile-fail/meta-expected-error-wrong-rev.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/COMPILER_TESTS.md b/COMPILER_TESTS.md index 9b63fe3fba3..3f91c3eb949 100644 --- a/COMPILER_TESTS.md +++ b/COMPILER_TESTS.md @@ -42,7 +42,7 @@ whole, instead of just a few lines inside the test. * `ignore-test` always ignores the test * `ignore-lldb` and `ignore-gdb` will skip the debuginfo tests * `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 errors in appropriate scenarios diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 755ec2f31dc..1042359d05b 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -359,7 +359,7 @@ pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn desc: test::TestDesc { name: make_test_name(config, testpaths), ignore: early_props.ignore, - should_panic: if early_props.should_panic { + should_panic: if early_props.should_fail { test::ShouldPanic::Yes } else { test::ShouldPanic::No diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 6882be44cbc..cf4d545a827 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -179,7 +179,7 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path, cfg: Option<&str> pub struct EarlyProps { pub ignore: bool, - pub should_panic: bool, + pub should_fail: bool, } // 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 { let mut props = EarlyProps { ignore: false, - should_panic: false, + should_fail: false, }; iter_header(testfile, None, &mut |ln| { @@ -206,9 +206,9 @@ pub fn early_props(config: &Config, testfile: &Path) -> EarlyProps { ignore_gdb(config, ln) || ignore_lldb(config, ln); - props.should_panic = - props.should_panic || - parse_name_directive(ln, "should-panic"); + props.should_fail = + props.should_fail || + parse_name_directive(ln, "should-fail"); }); return props; diff --git a/src/test/compile-fail/meta-expected-error-wrong-rev.rs b/src/test/compile-fail/meta-expected-error-wrong-rev.rs index 83e0702af62..084c6ed4f4b 100644 --- a/src/test/compile-fail/meta-expected-error-wrong-rev.rs +++ b/src/test/compile-fail/meta-expected-error-wrong-rev.rs @@ -9,7 +9,7 @@ // except according to those terms. // revisions: a -// should-panic +// should-fail // pretty-expanded FIXME #23616 // This is a "meta-test" of the compilertest framework itself. In