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

Fix false positives in testkit #480

Merged
merged 2 commits into from
Dec 7, 2017

Conversation

MasseGuillaume
Copy link
Contributor

@MasseGuillaume MasseGuillaume commented Dec 6, 2017

@olafurpg look what I found :p

I should always test edge cases.

@@ -205,7 +205,7 @@ object Patch {
case _: LintPatch => hasLintMessage = true
case _ => onlyLint = false
}
hasLintMessage && onlyLint
patch.isEmpty || hasLintMessage && onlyLint
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wrote an empty syntactic rule and I ran the SemanticSuite. It complained it was missing an output. This is because it checks if there are lint messages. It's obviously not the best way to fix this.

…xpected when assertions are empty

this would make a test pass if
* there are asserts but no reported messages
* there are reported messages but not asserts
@MasseGuillaume MasseGuillaume force-pushed the teskit-empty-assertdiff branch from 973b6ef to 7e2e559 Compare December 6, 2017 15:49
Copy link
Contributor

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

.flatMap(_.headOption.map(_.lintMessage))
.toList

val missmatch =
Copy link
Contributor

Choose a reason for hiding this comment

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

mismatch

@olafurpg olafurpg merged commit 85eb2b3 into scalacenter:master Dec 7, 2017
@MasseGuillaume MasseGuillaume deleted the teskit-empty-assertdiff branch December 7, 2017 12:21
@olafurpg olafurpg added this to the v0.5.7 milestone Dec 7, 2017
@olafurpg olafurpg changed the title Teskit empty assertdiff Gracefully handle empty linter rules in teskit Dec 7, 2017
@olafurpg olafurpg changed the title Gracefully handle empty linter rules in teskit Fix false positives in testkit Dec 7, 2017
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.

2 participants