groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 04/04: Import public method instead of private field
Date Tue, 13 Aug 2019 13:32:40 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 3fbccfbe0b22a2c718c9b1a325ccce26f3b473f0
Author: Eric Milles <eric.milles@thomsonreuters.com>
AuthorDate: Mon Aug 12 11:41:36 2019 -0500

    Import public method instead of private field
---
 src/test/groovy/StaticImportTest.groovy | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/test/groovy/StaticImportTest.groovy b/src/test/groovy/StaticImportTest.groovy
index 5f12f0b..4ef9adc 100644
--- a/src/test/groovy/StaticImportTest.groovy
+++ b/src/test/groovy/StaticImportTest.groovy
@@ -27,7 +27,7 @@ import static junit.framework.Assert.format
 import static junit.framework.Assert.assertEquals
 import static groovy.StaticImportTarget.x
 import static groovy.StaticImportTarget.z // do not remove
-import static groovy.StaticImportTarget.cl
+import static groovy.StaticImportTarget.getCl
 import static java.lang.Math.*
 import static java.util.Calendar.getInstance as now
 import static groovy.API.*
@@ -257,12 +257,14 @@ class StaticImportTest extends CompilableTestSupport {
             fail()
         } catch (MissingMethodException expected) {}
     }
-    
-    void testStaticImportOfAClosureField() { //GROOVY-3945
+
+    // GROOVY-3945
+    void testStaticImportOfAClosureProperty() {
         assert cl() == 'StaticImportTarget#static closure called'
     }
 
-    void testStaticPropertyImportedImplementedAsGetter() { //GROOVY-4145
+    // GROOVY-4145
+    void testStaticPropertyImportedImplementedAsGetter() {
         assert foo4145 == 3
     }
 


Mime
View raw message