Skip to content

Commit 2664aad

Browse files
committed
Report failing tests without //~ ERROR comments
1 parent 91d5d56 commit 2664aad

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,12 +2781,14 @@ impl<'test> TestCx<'test> {
27812781
explicit, self.config.compare_mode, expected_errors, proc_res.status,
27822782
self.props.error_patterns);
27832783
if !explicit && self.config.compare_mode.is_none() {
2784-
if !expected_errors.is_empty() && !proc_res.status.success() {
2785-
// "//~ERROR comments"
2786-
self.check_expected_errors(expected_errors, &proc_res);
2787-
} else if !self.props.error_patterns.is_empty() && !proc_res.status.success() {
2788-
// "// error-pattern" comments
2789-
self.check_error_patterns(&proc_res.stderr, &proc_res);
2784+
if !proc_res.status.success() {
2785+
if !self.props.error_patterns.is_empty() {
2786+
// "// error-pattern" comments
2787+
self.check_error_patterns(&proc_res.stderr, &proc_res);
2788+
} else {
2789+
// "//~ERROR comments"
2790+
self.check_expected_errors(expected_errors, &proc_res);
2791+
}
27902792
}
27912793
}
27922794

0 commit comments

Comments
 (0)