You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2017/08/28 16:09:51 UTC

[1/2] groovy git commit: Refine tests

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 8551ab4c8 -> 7effa9cb6
Updated Tags:  refs/tags/GROOVY_2_6_0_ALPHA_1 [created] 8a0aa3fc5


Refine tests

(cherry picked from commit a5fdef1)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/3520ce37
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/3520ce37
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/3520ce37

Branch: refs/heads/GROOVY_2_6_X
Commit: 3520ce372209f3a8480e9a45d44c5e10e992b94e
Parents: 8551ab4
Author: sunlan <su...@apache.org>
Authored: Mon Aug 28 14:33:40 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Tue Aug 29 00:06:43 2017 +0800

----------------------------------------------------------------------
 src/test/gls/generics/GenericsTest.groovy | 2 +-
 src/test/groovy/bugs/Groovy4252Bug.groovy | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/3520ce37/src/test/gls/generics/GenericsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/gls/generics/GenericsTest.groovy b/src/test/gls/generics/GenericsTest.groovy
index 3fe0e69..bfb726c 100644
--- a/src/test/gls/generics/GenericsTest.groovy
+++ b/src/test/gls/generics/GenericsTest.groovy
@@ -411,7 +411,7 @@ import java.util.concurrent.atomic.AtomicInteger
 
             shouldFailCompilationWithMessage """
                 def m(Class<Integer someParam) {}
-            """, "Unexpected input: 'Class<Integer someParam'"
+            """, "Unexpected input: '<'"
 
             shouldFailCompilationWithMessage """
                 abstract class ArrayList1<E extends AbstractList<E> implements List<E> {}

http://git-wip-us.apache.org/repos/asf/groovy/blob/3520ce37/src/test/groovy/bugs/Groovy4252Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy4252Bug.groovy b/src/test/groovy/bugs/Groovy4252Bug.groovy
index 1641286..39cab88 100644
--- a/src/test/groovy/bugs/Groovy4252Bug.groovy
+++ b/src/test/groovy/bugs/Groovy4252Bug.groovy
@@ -78,7 +78,7 @@ class Groovy4252Bug extends GroovyShellTestCase {
         } catch (MultipleCompilationErrorsException e) {
             def syntaxError = e.errorCollector.getSyntaxError(0)
             assert syntaxError.message.contains("Expression list of the form (a; b; c) is not supported in this context") ||
-                    syntaxError.message.contains("Missing ')'")
+                    syntaxError.message.contains("Unexpected input:")
         }
     }
 


[2/2] groovy git commit: Refine the error alternative of right parenthesis to trade off better performance and better message

Posted by su...@apache.org.
Refine the error alternative of right parenthesis to trade off better performance and better message


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/7effa9cb
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/7effa9cb
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/7effa9cb

Branch: refs/heads/GROOVY_2_6_X
Commit: 7effa9cb652b65da0969ac78ac49bf806b4d2b67
Parents: 3520ce3
Author: sunlan <su...@apache.org>
Authored: Tue Aug 29 00:08:40 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Tue Aug 29 00:08:40 2017 +0800

----------------------------------------------------------------------
 src/main/antlr/GroovyParser.g4 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/7effa9cb/src/main/antlr/GroovyParser.g4
----------------------------------------------------------------------
diff --git a/src/main/antlr/GroovyParser.g4 b/src/main/antlr/GroovyParser.g4
index dcda653..7320879 100644
--- a/src/main/antlr/GroovyParser.g4
+++ b/src/main/antlr/GroovyParser.g4
@@ -1283,8 +1283,9 @@ keywords
 rparen
     :   RPAREN
     |
-        // !!!Error Alternatives, impact the performance of parsing!!!
-        { require(false, "Missing ')'"); }
+        // !!!Error Alternatives
+        ~LPAREN
+        { require(false, "Missing ')'", -1); }
     ;
 
 nls