compiletest: explain that UI tests are expected not to compile by def… · rust-lang/rust@ab38efe (original) (raw)
File tree
1 file changed
lines changed
- src/tools/compiletest/src
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -350,10 +350,13 @@ impl<'test> TestCx<'test> { | ||
350 | 350 | } |
351 | 351 | } else { |
352 | 352 | if proc_res.status.success() { |
353 | -self.fatal_proc_rec( | |
354 | -&format!("{} test compiled successfully!", self.config.mode)[..], | |
355 | - proc_res, | |
356 | -); | |
353 | +{ | |
354 | +self.error(&format!("{} test did not emit an error", self.config.mode)); | |
355 | +if self.config.mode == crate::common::Mode::Ui { | |
356 | +println!("note: by default, ui tests are expected not to compile"); | |
357 | +} | |
358 | + proc_res.fatal(None, | | |
359 | +}; | |
357 | 360 | } |
358 | 361 | |
359 | 362 | if !self.props.dont_check_failure_status { |