Skip to content

add back the forgotten test file for patmat exhuastivity check #1609

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

Merged
merged 3 commits into from
Nov 9, 2016

Conversation

liufengyun
Copy link
Contributor

By adding back the ClassicReporter, I'm not nostalgic, but to avoid rewriting all the check files :)

Review @felixmulder .

@felixmulder
Copy link
Contributor

I'd prefer not to have duplicate reporters (we actually already have a third one in the sbt bridge 😱) - would it be alright with you @liufengyun if I took the time to amend the check files in this PR? (I'll push to staging)

@liufengyun
Copy link
Contributor Author

@felixmulder I'm afraid that each refactoring of the reporter (even a minor change capitalisation) would require update the check files, which will be very tedious and become a burden of maintenance.

@felixmulder
Copy link
Contributor

@liufengyun - true, let me sleep on it and we'll talk again tomorrow :)

@DarkDimius
Copy link
Contributor

DarkDimius commented Oct 19, 2016

@felixmulder @liufengyun, I'd remind you my suggestion for testing. Have a specific reporter that is only used in tests in order to provide minimal information used to compare test output to the expected value.

./tests/patmat/i947.scala:10: warning: unreachable code
       case ys: List[d18383] => false

would be reported as

UnreachabeCode(line, pos)

I'd also prefer to have this information defined inline in the tests itself, but that's a matter of taste.

@felixmulder
Copy link
Contributor

@DarkDimius - yes, we agreed upon this scheme this morning. Just haven't gotten around to it yet :)

@liufengyun
Copy link
Contributor Author

According my experience with testing, we often have the need to switch back and forth between check files and source code. Messages like UnreachabeCode(line, pos) is not friendly enough for test and development.

@DarkDimius
Copy link
Contributor

This is why I propose to have this message defined inline inside the test
file itself

On 19 October 2016 1:40:56 p.m. liu fengyun [email protected] wrote:

According my experience with testing, we often have the need to switch back
and forth between check files and source code. Messages like
UnreachabeCode(line, pos) is not friendly enough for test and development.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1609 (comment)

@liufengyun
Copy link
Contributor Author

@felixmulder what's your opinion on this? Any changes in mind?

@felixmulder
Copy link
Contributor

I have a solution in mind for neg tests, and I will build upon this PR.
Will probably have something to show for this in a couple of hours :)

On Tue, Nov 8, 2016, 10:11 liu fengyun [email protected] wrote:

@felixmulder https://github.com/felixmulder what's your opinion on
this? Any changes in mind?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1609 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABdYweDc-ALCp8wG_U-_cHyszu-Llvywks5q8Dy6gaJpZM4KaC6r
.

@felixmulder
Copy link
Contributor

Latest commit adds a very simplified version of the ClassicReporter that is not likely to change. It basically reports in this fashion:

2: Pattern Match Exhaustivity: List(_, _, _)

WDYT @liufengyun?

@liufengyun
Copy link
Contributor Author

liufengyun commented Nov 9, 2016

@felixmulder thanks for working on this. I'm fine for the changes. Good job 👍

@felixmulder felixmulder merged commit ab652d1 into scala:master Nov 9, 2016
@allanrenucci allanrenucci deleted the patmat-test branch December 14, 2017 19:24
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.

3 participants