From dc3aa26e3f23249157bbd08a458630e24544ad2d Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 22 Mar 2017 14:32:49 +0300 Subject: [PATCH] Ignore getMembersOfStandardJavaClasses light analysis test See #KT-16616 --- .../getMembersOfStandardJavaClasses.kt | 5 +++-- .../codegen/AbstractLightAnalysisModeTest.kt | 1 + .../ir/IrBlackBoxCodegenTestGenerated.java | 18 ++++++------------ .../codegen/BlackBoxCodegenTestGenerated.java | 18 ++++++------------ .../LightAnalysisModeTestGenerated.java | 18 ++++++------------ 5 files changed, 22 insertions(+), 38 deletions(-) diff --git a/compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt b/compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt index a124113eef4..0927f54846d 100644 --- a/compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt +++ b/compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt @@ -1,11 +1,12 @@ // TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE, JVM +// IGNORE_BACKEND: JS, NATIVE // WITH_REFLECT // FULL_JDK // See KT-11258 Incorrect resolution sequence for Java field -//SHOULD BE enabled after KT-16616 fix +// TODO: enable this test on JVM, see KT-16616 +// IGNORE_BACKEND_WITHOUT_CHECK: JVM import java.util.* diff --git a/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt b/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt index aaada3795de..4686fbfa99c 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt +++ b/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt @@ -25,6 +25,7 @@ import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension import org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.InTextDirectivesUtils +import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.TestJdkKind import org.jetbrains.org.objectweb.asm.Opcodes.* diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index dd8d1673fc5..09f1909d332 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -15264,20 +15264,14 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractIrBlackBoxCodegenTest { - public void testAllFilesPresentInSpecialBuiltIns() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + @TestMetadata("getMembersOfStandardJavaClasses.kt") + public void ignoreGetMembersOfStandardJavaClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + doTest(fileName); } - @TestMetadata("getMembersOfStandardJavaClasses.kt") - public void testGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - try { - doTest(fileName); - } - catch (Throwable ignore) { - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index e38c7a545bb..04a52f30ff3 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -15264,20 +15264,14 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInSpecialBuiltIns() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + @TestMetadata("getMembersOfStandardJavaClasses.kt") + public void ignoreGetMembersOfStandardJavaClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + doTest(fileName); } - @TestMetadata("getMembersOfStandardJavaClasses.kt") - public void testGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - try { - doTest(fileName); - } - catch (Throwable ignore) { - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 93048742a71..fbe40dd191d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15264,20 +15264,14 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractLightAnalysisModeTest { - public void testAllFilesPresentInSpecialBuiltIns() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + @TestMetadata("getMembersOfStandardJavaClasses.kt") + public void ignoreGetMembersOfStandardJavaClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + doTest(fileName); } - @TestMetadata("getMembersOfStandardJavaClasses.kt") - public void testGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - try { - doTest(fileName); - } - catch (Throwable ignore) { - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } }