OpenJDK / amber / amber
changeset 57000:3d7072d56e6d amber-demo-II
Automatic merge with records-and-sealed
author | mcimadamore |
---|---|
date | Fri, 16 Aug 2019 18:35:43 +0000 |
parents | a8905b85b1f8 b58b165af743 |
children | 475bf8c9563b |
files | |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/test/langtools/tools/javac/sealed/CheckingAttributeAtRuntimeTest.java Fri Aug 16 16:05:45 2019 +0000 +++ b/test/langtools/tools/javac/sealed/CheckingAttributeAtRuntimeTest.java Fri Aug 16 18:35:43 2019 +0000 @@ -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"))); } }