OpenJDK / amber / amber
changeset 56999:b58b165af743 records-and-sealed
fixing test CheckingAttributeAtRuntimeTest
author | vromero |
---|---|
date | Fri, 16 Aug 2019 14:31:37 -0400 |
parents | 6fbc84eefe66 |
children | 3d7072d56e6d 6b7ea91a2528 |
files | test/langtools/tools/javac/sealed/CheckingAttributeAtRuntimeTest.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/test/langtools/tools/javac/sealed/CheckingAttributeAtRuntimeTest.java Fri Aug 16 11:57:15 2019 -0400 +++ b/test/langtools/tools/javac/sealed/CheckingAttributeAtRuntimeTest.java Fri Aug 16 14:31:37 2019 -0400 @@ -27,6 +27,7 @@ * @modules jdk.compiler/com.sun.tools.javac.util */ +import java.lang.constant.*; import com.sun.tools.javac.util.Assert; public class CheckingAttributeAtRuntimeTest { @@ -47,27 +48,27 @@ Class<?> sealedClass1 = Sealed1.class; Assert.check(sealedClass1.isSealed()); Assert.check(sealedClass1.getPermittedSubtypes().length == 1); - Assert.check(sealedClass1.getPermittedSubtypes()[0] == Sub1.class); + Assert.check(sealedClass1.getPermittedSubtypes()[0].equals(ClassDesc.of("CheckingAttributeAtRuntimeTest").nested("Sub1"))); Class<?> sealedI = SealedI1.class; Assert.check(sealedI.isSealed()); Assert.check(sealedI.getPermittedSubtypes().length == 1); - Assert.check(sealedI.getPermittedSubtypes()[0] == Sub2.class); + Assert.check(sealedI.getPermittedSubtypes()[0].equals(ClassDesc.of("CheckingAttributeAtRuntimeTest").nested("Sub2"))); Class<?> sealedClass2 = Sealed2.class; Assert.check(sealedClass2.isSealed()); Assert.check(sealedClass2.getPermittedSubtypes().length == 1); - Assert.check(sealedClass2.getPermittedSubtypes()[0] == Sub3.class); + Assert.check(sealedClass2.getPermittedSubtypes()[0].equals(ClassDesc.of("CheckingAttributeAtRuntimeTest").nested("Sub3"))); Class<?> sealedClass3 = Sealed3.class; Assert.check(sealedClass3.isSealed()); Assert.check(sealedClass3.getPermittedSubtypes().length == 1); - Assert.check(sealedClass3.getPermittedSubtypes()[0] == Sub4.class); + Assert.check(sealedClass3.getPermittedSubtypes()[0].equals(ClassDesc.of("Sub4"))); Class<?> sealedClass4 = Sealed4.class; Assert.check(sealedClass4.isSealed()); Assert.check(sealedClass4.getPermittedSubtypes().length == 1); - Assert.check(sealedClass4.getPermittedSubtypes()[0] == Sub5.class); + Assert.check(sealedClass4.getPermittedSubtypes()[0].equals(ClassDesc.of("Sub5"))); } }