rename should-panic to should-fail, per acrichto's suggestion
This commit is contained in:
parent
0d6b4e0386
commit
ad3ed80503
4 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue