Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 696d42c91 -> 858fb365f


Choose the right data for node position

(cherry picked from commit ddcb01a)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 858fb365fbb05f4e7049ea42c6db2310ecc25d02
Parents: 696d42c
Author: sunlan <sun...@apache.org>
Authored: Mon Aug 7 02:27:22 2017 +0800
Committer: sunlan <sun...@apache.org>
Committed: Mon Aug 7 08:48:11 2017 +0800

----------------------------------------------------------------------
 src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/858fb365/src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy 
b/src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy
index bdf16a8..91e81d1 100644
--- a/src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy
+++ b/src/test/org/codehaus/groovy/ast/LineColumnCheckTest.groovy
@@ -53,6 +53,8 @@ import org.codehaus.groovy.ast.expr.UnaryMinusExpression
 import org.codehaus.groovy.ast.expr.UnaryPlusExpression
 import org.codehaus.groovy.ast.expr.VariableExpression
 import org.codehaus.groovy.ast.stmt.Statement
+import org.codehaus.groovy.control.CompilerConfiguration
+import org.codehaus.groovy.control.ParserVersion
 import org.codehaus.groovy.control.SourceUnit
 import org.junit.Before
 import org.junit.Test
@@ -99,7 +101,7 @@ class LineColumnCheckTest extends ASTTest {
         List testdata = extractData("${TEST_FILE_PREFIX}.txt")
         //flip if condition as per below and swap antlr2/4 ordering once 
antlr4 is the default
         //if (System.getProperty('groovy.antlr4') != 'false') {
-        if (System.getProperty('groovy.antlr4') != 'true') {
+        if (ParserVersion.V_2 == CompilerConfiguration.DEFAULT.parserVersion) {
             testdata += extractData("${TEST_FILE_PREFIX}_antlr2.txt")
         } else {
             testdata += extractData("${TEST_FILE_PREFIX}_antlr4.txt")

Reply via email to