You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by vl...@apache.org on 2022/05/30 20:40:42 UTC
[tapestry-5] branch TAP5-2723 updated: Account for Java 12+ class hierarchy.
This is an automated email from the ASF dual-hosted git repository.
vlamp pushed a commit to branch TAP5-2723
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/TAP5-2723 by this push:
new 2a5424c12 Account for Java 12+ class hierarchy.
2a5424c12 is described below
commit 2a5424c1201f2d8d1467cd605f9758228467035f
Author: Volker Lamp <vl...@apache.org>
AuthorDate: Mon May 30 22:40:17 2022 +0200
Account for Java 12+ class hierarchy.
---
.../groovy/ioc/specs/InheritanceSearchSpec.groovy | 50 +++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/InheritanceSearchSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/InheritanceSearchSpec.groovy
index 993b657fb..eb7819d2a 100644
--- a/tapestry-ioc/src/test/groovy/ioc/specs/InheritanceSearchSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/ioc/specs/InheritanceSearchSpec.groovy
@@ -9,6 +9,7 @@ import org.apache.tapestry5.ioc.test.internal.util.ToyTruck
import org.apache.tapestry5.ioc.test.internal.util.ToyTruckImpl
import org.apache.tapestry5.plastic.PlasticUtils
+import spock.lang.IgnoreIf
import spock.lang.Specification
import spock.lang.Unroll
@@ -57,7 +58,6 @@ class InheritanceSearchSpec extends Specification {
clazz | expected
Object | [Object]
- String | [String, Serializable, Comparable, CharSequence, Object]
Comparable | [Comparable, Object]
ToyTruck | [ToyTruck, Playable, Drivable, Object]
ToyTruckImpl | [ToyTruckImpl, PlayableImpl, DrivableImpl, Drivable, ToyTruck, Playable, Object]
@@ -72,4 +72,52 @@ class InheritanceSearchSpec extends Specification {
expectedNames = expected.collect { PlasticUtils.toTypeName(it) }.join(", ")
}
+
+ @IgnoreIf(value = { jvm.java12Compatible })
+ @Unroll
+ def "inheritance of #className is #expectedNames (Java < 12)"() {
+ def search = new InheritanceSearch(clazz)
+ def result = []
+ while (search.hasNext()) {
+ result << search.next()
+ }
+
+ expect:
+
+ result == expected
+
+ where:
+
+ clazz | expected
+ String | [String, Serializable, Comparable, CharSequence, Object]
+
+ className = PlasticUtils.toTypeName(clazz)
+ expectedNames = expected.collect { PlasticUtils.toTypeName(it) }.join(", ")
+
+ }
+
+
+ @IgnoreIf(value = { !jvm.java12Compatible })
+ @Unroll
+ def "inheritance of #className is #expectedNames (Java 12+)"() {
+ def search = new InheritanceSearch(clazz)
+ def result = []
+ while (search.hasNext()) {
+ result << search.next()
+ }
+
+ expect:
+
+ result == expected
+
+ where:
+
+ clazz | expected
+ String | [String, Serializable, Comparable, CharSequence, Constable, ConstantDesc, Object]
+
+ className = PlasticUtils.toTypeName(clazz)
+ expectedNames = expected.collect { PlasticUtils.toTypeName(it) }.join(", ")
+
+ }
+
}
\ No newline at end of file