Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiletest: //~ ERROR annotations are ignored in compile-pass tests #56277

Closed
petrochenkov opened this issue Nov 27, 2018 · 1 comment · Fixed by #65759
Closed

compiletest: //~ ERROR annotations are ignored in compile-pass tests #56277

petrochenkov opened this issue Nov 27, 2018 · 1 comment · Fixed by #65759
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

Reproduction:

// compile-pass

fn main() {} //~ ERROR any misleading message

The test passes despite the incorrect //~ ERROR annotation.

Tests often have these annotations while they are WIP, but then everything is good, the test passes and is marked as // compile-pass, but stray //~ ERROR annotations may remain confusing the reader.

@petrochenkov petrochenkov added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-help-wanted Call for participation: Help is requested to fix this issue. labels Nov 27, 2018
@petrochenkov
Copy link
Contributor Author

Somewhat similar to #55596

Centril added a commit to Centril/rust that referenced this issue Oct 29, 2019
Validate error patterns and error annotation in ui tests when present

Previously, when compilation succeeded, neither error patterns nor error
annotation would be validated. Additionally, when compilation failed,
only error patterns would be validated if both error patterns and error
annotation were present.

Now both error patterns and error annotation are validated when present,
regardless of compilation status. Furthermore, for test that should run,
the error patterns are matched against executable output, which is what
some of tests already expect to happen, and when rust-lang#65506 is merged even
more ui tests will.

Fixes rust-lang#56277
tmandry added a commit to tmandry/rust that referenced this issue Nov 1, 2019
Validate error patterns and error annotation in ui tests when present

Previously, when compilation succeeded, neither error patterns nor error
annotation would be validated. Additionally, when compilation failed,
only error patterns would be validated if both error patterns and error
annotation were present.

Now both error patterns and error annotation are validated when present,
regardless of compilation status. Furthermore, for test that should run,
the error patterns are matched against executable output, which is what
some of tests already expect to happen, and when rust-lang#65506 is merged even
more ui tests will.

Fixes rust-lang#56277
tmandry added a commit to tmandry/rust that referenced this issue Nov 1, 2019
Validate error patterns and error annotation in ui tests when present

Previously, when compilation succeeded, neither error patterns nor error
annotation would be validated. Additionally, when compilation failed,
only error patterns would be validated if both error patterns and error
annotation were present.

Now both error patterns and error annotation are validated when present,
regardless of compilation status. Furthermore, for test that should run,
the error patterns are matched against executable output, which is what
some of tests already expect to happen, and when rust-lang#65506 is merged even
more ui tests will.

Fixes rust-lang#56277
bors added a commit that referenced this issue Nov 2, 2019
Validate error patterns and error annotation in ui tests when present

Previously, when compilation succeeded, neither error patterns nor error
annotation would be validated. Additionally, when compilation failed,
only error patterns would be validated if both error patterns and error
annotation were present.

Now both error patterns and error annotation are validated when present,
regardless of compilation status. Furthermore, for test that should run,
the error patterns are matched against executable output, which is what
some of tests already expect to happen, and when #65506 is merged even
more ui tests will.

Fixes #56277
@bors bors closed this as completed in b43a682 Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant