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

Neg tests check files for // error markers (rebased and updated) #1106

Merged
merged 6 commits into from
Feb 19, 2016

Conversation

VladimirNik
Copy link
Contributor

Rebased and updated version of #720

Differences between this and previous pull request (#720):

  1. All neg tests are updated in accordance with new checks;
  2. Starting from 73fad44 CompilerTest doesn't extend DottyTest and we cannot use DottyTest#ctx in CompilerTest. Because of that:
val allFiles = CompilerCommand.distill(allArgs)(ctx).arguments

is changed to:

val allFiles = (allArgs filter {
  arg => !arg.startsWith("-") && (arg.endsWith(".scala") || arg.endsWith(".java"))
}).toList

Review by @odersky @DarkDimius

@DarkDimius
Copy link
Contributor

is changed to:

AFAIK all special scalac options start from -, so I'd add filter that filenames cannot start from -

@VladimirNik
Copy link
Contributor Author

@DarkDimius '-' filtering updated

@@ -2,6 +2,6 @@ class A

object Test {
def a = () => ()
def a[T] = (p:A) => ()
def a[T] = (p:A) => () // error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a pos test or a neg test.
If some option is needed to make test fail, please specify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is no longer neg test. Comment is removed

@DarkDimius
Copy link
Contributor

LGTM

DarkDimius added a commit that referenced this pull request Feb 19, 2016
Neg tests check files for // error markers (rebased and updated)
@DarkDimius DarkDimius merged commit ea407f1 into scala:master Feb 19, 2016
@allanrenucci allanrenucci deleted the neg-lines branch December 14, 2017 19:24
Blaisorblade added a commit to dotty-staging/dotty that referenced this pull request Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants