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 2020/03/21 05:09:27 UTC
[groovy] 03/03: Fix some failing tests
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/openjdk14
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit a7bd160f7b1f50ef70c112c30dd53a27436ef285
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Mar 21 13:05:32 2020 +0800
Fix some failing tests
---
src/test/gls/annotations/AnnotationTest.groovy | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/test/gls/annotations/AnnotationTest.groovy b/src/test/gls/annotations/AnnotationTest.groovy
index 43d26f0..c91078c 100644
--- a/src/test/gls/annotations/AnnotationTest.groovy
+++ b/src/test/gls/annotations/AnnotationTest.groovy
@@ -641,7 +641,9 @@ final class AnnotationTest extends CompilableTestSupport {
def string = getClass().getMethod('method').getAnnotation(Foo).toString()[5..-2].tokenize(', ').sort().join('|')
assert string == 'b=6|c1=A|c2=B|c3=C|c4=D|d1=2.0|d2=2.1|d3=2.2|d4=2.3|f1=1.0|f2=1.1|f3=1.2|f4=1.3|i1=0|i2=1|s1=2|s2=3|s3=4|s4=5' ||
// changed in some jdk9 versions
- string == "b=6|c1='A'|c2='B'|c3='C'|c4='D'|d1=2.0|d2=2.1|d3=2.2|d4=2.3|f1=1.0f|f2=1.1f|f3=1.2f|f4=1.3f|i1=0|i2=1|s1=2|s2=3|s3=4|s4=5"
+ string == "b=6|c1='A'|c2='B'|c3='C'|c4='D'|d1=2.0|d2=2.1|d3=2.2|d4=2.3|f1=1.0f|f2=1.1f|f3=1.2f|f4=1.3f|i1=0|i2=1|s1=2|s2=3|s3=4|s4=5" ||
+ // changed in some jdk14 versions
+ string == "b=(byte)0x06|c1='A'|c2='B'|c3='C'|c4='D'|d1=2.0|d2=2.1|d3=2.2|d4=2.3|f1=1.0f|f2=1.1f|f3=1.2f|f4=1.3f|i1=0|i2=1|s1=2|s2=3|s3=4|s4=5"
'''
}
@@ -713,7 +715,8 @@ final class AnnotationTest extends CompilableTestSupport {
// TODO confirm the JDK9 behavior is what we expect
private static final List<String> expected = [
'@MyAnnotationArray(value=[@MyAnnotation(value=val1), @MyAnnotation(value=val2)])', // JDK5-8
- '@MyAnnotationArray(value={@MyAnnotation(value="val1"), @MyAnnotation(value="val2")})' // JDK9
+ '@MyAnnotationArray(value={@MyAnnotation(value="val1"), @MyAnnotation(value="val2")})', // JDK9
+ '@MyAnnotationArray({@MyAnnotation("val1"), @MyAnnotation("val2")})' // JDK14
]
// control
@@ -907,7 +910,8 @@ final class AnnotationTest extends CompilableTestSupport {
// TODO confirm the JDK9 behavior is what we expect
private static final List<String> expected = [
'@gls.annotations.Requires(value=[@gls.annotations.Require(value=val1), @gls.annotations.Require(value=val2)])', // JDK5-8
- '@gls.annotations.Requires(value={@gls.annotations.Require(value="val1"), @gls.annotations.Require(value="val2")})' // JDK9
+ '@gls.annotations.Requires(value={@gls.annotations.Require(value="val1"), @gls.annotations.Require(value="val2")})', // JDK9
+ '@gls.annotations.Requires({@gls.annotations.Require("val1"), @gls.annotations.Require("val2")})' // JDK14
]
// control