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 2018/09/22 17:53:24 UTC
groovy git commit: Refine tests for GROOVY-8327
Repository: groovy
Updated Branches:
refs/heads/master 87c631035 -> 35a97e9c6
Refine tests for GROOVY-8327
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/35a97e9c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/35a97e9c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/35a97e9c
Branch: refs/heads/master
Commit: 35a97e9c6474537bc574ddbfc03b8e679cb8b997
Parents: 87c6310
Author: Daniel Sun <su...@apache.org>
Authored: Sun Sep 23 01:53:17 2018 +0800
Committer: Daniel Sun <su...@apache.org>
Committed: Sun Sep 23 01:53:17 2018 +0800
----------------------------------------------------------------------
src/test/groovy/bugs/Groovy8327Bug.groovy | 30 +++++++++++++++-----------
1 file changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/35a97e9c/src/test/groovy/bugs/Groovy8327Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy8327Bug.groovy b/src/test/groovy/bugs/Groovy8327Bug.groovy
index 1dbb279..a70cb81 100644
--- a/src/test/groovy/bugs/Groovy8327Bug.groovy
+++ b/src/test/groovy/bugs/Groovy8327Bug.groovy
@@ -22,11 +22,12 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallStaticMethodInClosureParamOfThisConstructor() {
assertScript '''
class A {
+ static String x = '123'
static String g() { 'abc' }
A() {
- this({g()})
+ this({g() + getX()})
}
- A(a) { assert 'abc' == a() }
+ A(a) { assert 'abc123' == a() }
}
assert new A()
@@ -36,11 +37,12 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallStaticMethodInThisConstructor() {
assertScript '''
class A {
+ static String x = '123'
static String g() { 'abc' }
A() {
- this(g())
+ this(g() + getX())
}
- A(a) { assert 'abc' == a }
+ A(a) { assert 'abc123' == a }
}
assert new A()
@@ -50,12 +52,13 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallStaticMethodInClosureParamOfSuperConstructor() {
assertScript '''
class B {
- B(b) { assert 'abc' == b() }
+ B(b) { assert 'abc123' == b() }
}
class A extends B {
+ static String x = '123'
static String g() { 'abc' }
A() {
- super({g()})
+ super({g() + getX()})
}
}
@@ -66,12 +69,13 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallStaticMethodInSuperConstructor() {
assertScript '''
class B {
- B(b) { assert 'abc' == b }
+ B(b) { assert 'abc123' == b }
}
class A extends B {
+ static String x = '123'
static String g() { 'abc' }
A() {
- super(g())
+ super(g() + getX())
}
}
@@ -82,12 +86,13 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallSuperStaticMethodInClosureParamOfSuperConstructor() {
assertScript '''
class B {
- B(b) { assert 'abc' == b() }
+ B(b) { assert 'abc123' == b() }
+ static String x = '123'
static String g() { 'abc' }
}
class A extends B {
A() {
- super({g()})
+ super({g() + getX()})
}
}
@@ -98,12 +103,13 @@ class Groovy8327Bug extends GroovyTestCase {
void testCallSuperStaticMethodInSuperConstructor() {
assertScript '''
class B {
- B(b) { assert 'abc' == b }
+ B(b) { assert 'abc123' == b }
+ static String x = '123'
static String g() { 'abc' }
}
class A extends B {
A() {
- super(g())
+ super(g() + getX())
}
}