Skip to content

Neg tests could infer //error and // error as the same thing #7051

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

Closed
ashwinbhaskar opened this issue Aug 16, 2019 · 7 comments
Closed

Neg tests could infer //error and // error as the same thing #7051

ashwinbhaskar opened this issue Aug 16, 2019 · 7 comments
Assignees

Comments

@ashwinbhaskar
Copy link
Contributor

When writing tests in neg package we have the option of giving // error at the end of a line to indicate a compilation error on that line. The space between // and error is strictly required and I have spent a lot of time figuring out why my tests in the neg folder did not work. Apparently I missed the space.

Can we simplify this by treating both //error and // error as the same?

@nicolasstucki
Copy link
Contributor

It would be better to have a single and homogeneous format.

What we could do is to identify //error in the test framework an emit a warning. This way if the test fail because the error tag was wrong, there will be a warning just before the test failure.

@ashwinbhaskar
Copy link
Contributor Author

It would be better to have a single and homogeneous format.

What we could do is to identify //error in the test framework an emit a warning. This way if the test fail because the error tag was wrong, there will be a warning just before the test failure.

@nicolasstucki Makes sense. Where should I start from if I am going to do this enhancement?

@nicolasstucki
Copy link
Contributor

Probably here

https://github.com/lampepfl/dotty/blob/master/compiler/test/dotty/tools/vulpix/ParallelTesting.scala#L657

@ashwinbhaskar
Copy link
Contributor Author

Can you assign this to me?

@ashwinbhaskar
Copy link
Contributor Author

@nicolasstucki Is there any logger that I can use to print a warning? Or can I just go ahead with a println?

@nicolasstucki
Copy link
Contributor

ashwinbhaskar added a commit to ashwinbhaskar/dotty that referenced this issue Aug 18, 2019
@ashwinbhaskar
Copy link
Contributor Author

ashwinbhaskar added a commit to ashwinbhaskar/dotty that referenced this issue Aug 20, 2019
nicolasstucki added a commit that referenced this issue Aug 20, 2019
Fixes #7051 Detect typos in neg tests and give a warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants