groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Refine the test of GROOVY-8531
Date Tue, 22 May 2018 04:42:21 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X cf569fce1 -> d7093ef8c


Refine the test of GROOVY-8531

(cherry picked from commit 416a693)


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

Branch: refs/heads/GROOVY_2_5_X
Commit: d7093ef8cb81376e4517dc4d21086d829cc6ff68
Parents: cf569fc
Author: sunlan <sunlan@apache.org>
Authored: Tue May 22 12:41:15 2018 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Tue May 22 12:42:16 2018 +0800

----------------------------------------------------------------------
 src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy | 4 ++++
 src/test/groovy/bugs/groovy8531/Reducer.java         | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d7093ef8/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy b/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
index 2369d88..53a71f2 100644
--- a/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
+++ b/src/test/groovy/bugs/groovy8531/Groovy8531Bug.groovy
@@ -33,6 +33,8 @@ class Groovy8531Bug extends GroovyTestCase {
                 public void reduce7(PublicStaticBaseContext context) {}
                 public void reduce8(ProtectedStaticBaseContext context) {}
                 
+                public void reduce9(InterfaceContext context) {}
+                
                 public boolean isDynamic(Type type) {
                     return Type.DYNAMIC == type
                 }
@@ -48,6 +50,8 @@ class Groovy8531Bug extends GroovyTestCase {
             new Example().reduce7(null)
             new Example().reduce8(null)
             
+            new Example().reduce9(null)
+            
             assert new Example().isDynamic(Reducer.Type.DYNAMIC)
         '''
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d7093ef8/src/test/groovy/bugs/groovy8531/Reducer.java
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/groovy8531/Reducer.java b/src/test/groovy/bugs/groovy8531/Reducer.java
index 6cf865f..8652196 100644
--- a/src/test/groovy/bugs/groovy8531/Reducer.java
+++ b/src/test/groovy/bugs/groovy8531/Reducer.java
@@ -18,6 +18,10 @@
  */
 package groovy.bugs.groovy8531;
 
+interface Reducable {
+    class InterfaceContext {}
+}
+
 class BaseReducer {
     public abstract class PublicBaseContext {}
     protected abstract class ProtectedBaseContext {}
@@ -26,7 +30,7 @@ class BaseReducer {
     private abstract class PrivateBaseContext {}
 }
 
-public class Reducer extends BaseReducer {
+public class Reducer extends BaseReducer implements Reducable {
     public abstract class PublicContext {}
     protected abstract class ProtectedContext {}
     public static abstract class PublicStaticContext {}


Mime
View raw message