Similar to above, failed to notice that Mode::Incremental delegates to run_{rpass,rfail,cfail}_test.

(Also, maybe we should revise the names to make it clear that sometimes "cfail" means "cpass"...)
This commit is contained in:
Felix S. Klock II 2018-09-15 07:01:47 +02:00
parent a66b7d4e9d
commit bae2bf12f6

View file

@ -274,6 +274,18 @@ impl<'test> TestCx<'test> {
ParseFail | CompileFail => false,
RunPass => true,
Ui => self.props.compile_pass,
Incremental => {
let revision = self.revision
.expect("incremental tests require a list of revisions");
if revision.starts_with("rpass") || revision.starts_with("rfail") {
true
} else if revision.starts_with("cfail") {
// FIXME: would be nice if incremental revs could start with "cpass"
self.props.compile_pass
} else {
panic!("revision name must begin with rpass, rfail, or cfail");
}
}
mode => panic!("unimplemented for mode {:?}", mode),
}
}