[
https://issues.apache.org/jira/browse/GROOVY-7717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066030#comment-15066030
]
ASF GitHub Bot commented on GROOVY-7717:
----------------------------------------
GitHub user shils opened a pull request:
https://github.com/apache/groovy/pull/217
GROOVY-7717 StaticTypeCheckingTestCase#shouldFailWithMessages erroneo…
…usly passes
*StaticTypeCheckingTestCase: shouldFailWithMessages should only pass if all
and only the expected error messages occur
*PrecompiledExtensionNotExtendingDSL: fix ASTNode associated with error
added in onMethodSelection method
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shils/groovy GROOVY-7717
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/217.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #217
----
commit fbcdfe87236a6db6946ba5d29255d7217670b72c
Author: Shil Sinha <[email protected]>
Date: 2015-12-21T03:58:55Z
GROOVY-7717 StaticTypeCheckingTestCase#shouldFailWithMessages erroneously
passes
*StaticTypeCheckingTestCase: shouldFailWithMessages should only pass if all
and only the expected error messages occur
*PrecompiledExtensionNotExtendingDSL: fix ASTNode associated with error
added in onMethodSelection method
----
> StaticTypeCheckingTestCase#shouldFailWithMessages erroneously passes
> --------------------------------------------------------------------
>
> Key: GROOVY-7717
> URL: https://issues.apache.org/jira/browse/GROOVY-7717
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.4.5
> Reporter: Shil Sinha
> Assignee: Shil Sinha
>
> When StaticTypeCheckingTestCase#shouldFailWithMessages(String, String...) is
> called with multiple message arguments, the call returns successfully if both
> of the following are true:
> 1) at least one argument is contained in a collected error message
> 2) the number of message arguments equals the number of collected errors
> This causes tests to erroneously pass, even if they don't result in all of
> the desired errors. For example,
> TypeCheckingExtensionsTest#testPrecompiledExtensionNotExtendingTypeCheckingDSL
> currently passes even though
> PrecompiledExtensionNotExtendingTypeCheckingDSL#onMethodSelection throws a
> MissingPropertyException (which is converted to a compilation error in
> CompilationUnit#applyToPrimaryClassNodes) instead of actually adding the
> intended static type error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)