In LightAnalysisModeTestGenerated skip tests ignored in JVM
When a test is marked as ignored in JVM BE (i.e. IGNORE_BACKEND: JVM) it's ignored in LightAnalysisModeTestGenerated. This means that this tests is expected to fail. However, often tests that fail in JVM blackbox tests, don't fail in LAMTG, therefore it's reasonable to skip these tests in LAMTG at all.
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
// TARGET_BACKEND: JS
|
// IGNORE_BACKEND: JVM
|
||||||
// This test causes JVM to generate incorrect bytecode
|
|
||||||
// Could not use IGNORE_BACKEND directive, since it makes LightAnalysisModeCodegenTestsGenerated fail on this test
|
|
||||||
|
|
||||||
interface I<T> {
|
interface I<T> {
|
||||||
val prop: T
|
val prop: T
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Enable for JVM backend when KT-8120 gets fixed
|
// Enable for JVM backend when KT-8120 gets fixed
|
||||||
// TARGET_BACKEND: JS
|
// IGNORE_BACKEND: JVM
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
var log = ""
|
var log = ""
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Enable for JVM backend when KT-8120 gets fixed
|
// Enable for JVM backend when KT-8120 gets fixed
|
||||||
// TARGET_BACKEND: JS
|
// IGNORE_BACKEND: JVM
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val capturedInConstructor = 1
|
val capturedInConstructor = 1
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// Enable when KT-14833 is fixed.
|
// Enable when KT-14833 is fixed.
|
||||||
// TARGET_BACKEND: JS
|
// IGNORE_BACKEND: JVM
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
var a = 0
|
var a = 0
|
||||||
|
|||||||
+48
@@ -6269,6 +6269,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("implementedByFake.kt")
|
||||||
|
public void testImplementedByFake() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6382.kt")
|
@TestMetadata("kt6382.kt")
|
||||||
public void testKt6382() throws Exception {
|
public void testKt6382() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt");
|
||||||
@@ -10466,12 +10478,36 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("closureOfInnerLocalClass.kt")
|
||||||
|
public void testClosureOfInnerLocalClass() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("closureOfLambdaInLocalClass.kt")
|
@TestMetadata("closureOfLambdaInLocalClass.kt")
|
||||||
public void testClosureOfLambdaInLocalClass() throws Exception {
|
public void testClosureOfLambdaInLocalClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("closureWithSelfInstantiation.kt")
|
||||||
|
public void testClosureWithSelfInstantiation() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inExtensionFunction.kt")
|
@TestMetadata("inExtensionFunction.kt")
|
||||||
public void testInExtensionFunction() throws Exception {
|
public void testInExtensionFunction() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
|
||||||
@@ -12533,6 +12569,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("augmentedAssignmentsAndIncrements.kt")
|
||||||
|
public void testAugmentedAssignmentsAndIncrements() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classArtificialFieldInsideNested.kt")
|
@TestMetadata("classArtificialFieldInsideNested.kt")
|
||||||
public void testClassArtificialFieldInsideNested() throws Exception {
|
public void testClassArtificialFieldInsideNested() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt");
|
||||||
|
|||||||
@@ -6269,6 +6269,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("implementedByFake.kt")
|
||||||
|
public void testImplementedByFake() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6382.kt")
|
@TestMetadata("kt6382.kt")
|
||||||
public void testKt6382() throws Exception {
|
public void testKt6382() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt");
|
||||||
@@ -10466,12 +10478,36 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("closureOfInnerLocalClass.kt")
|
||||||
|
public void testClosureOfInnerLocalClass() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("closureOfLambdaInLocalClass.kt")
|
@TestMetadata("closureOfLambdaInLocalClass.kt")
|
||||||
public void testClosureOfLambdaInLocalClass() throws Exception {
|
public void testClosureOfLambdaInLocalClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("closureWithSelfInstantiation.kt")
|
||||||
|
public void testClosureWithSelfInstantiation() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inExtensionFunction.kt")
|
@TestMetadata("inExtensionFunction.kt")
|
||||||
public void testInExtensionFunction() throws Exception {
|
public void testInExtensionFunction() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
|
||||||
@@ -12533,6 +12569,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("augmentedAssignmentsAndIncrements.kt")
|
||||||
|
public void testAugmentedAssignmentsAndIncrements() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classArtificialFieldInsideNested.kt")
|
@TestMetadata("classArtificialFieldInsideNested.kt")
|
||||||
public void testClassArtificialFieldInsideNested() throws Exception {
|
public void testClassArtificialFieldInsideNested() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt");
|
||||||
|
|||||||
@@ -40,6 +40,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Annotations extends AbstractLightAnalysisModeTest {
|
public static class Annotations extends AbstractLightAnalysisModeTest {
|
||||||
|
@TestMetadata("wrongAnnotationArgumentInCtor.kt")
|
||||||
|
public void ignoreWrongAnnotationArgumentInCtor() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.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 testAllFilesPresentInAnnotations() throws Exception {
|
public void testAllFilesPresentInAnnotations() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
@@ -152,18 +164,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("wrongAnnotationArgumentInCtor.kt")
|
|
||||||
public void testWrongAnnotationArgumentInCtor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
@TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -5646,12 +5646,8 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class SuspendFunctionAsCoroutine extends AbstractLightAnalysisModeTest {
|
public static class SuspendFunctionAsCoroutine extends AbstractLightAnalysisModeTest {
|
||||||
public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("augmentedAssignment.kt")
|
@TestMetadata("augmentedAssignment.kt")
|
||||||
public void testAugmentedAssignment() throws Exception {
|
public void ignoreAugmentedAssignment() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/augmentedAssignment.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/augmentedAssignment.kt");
|
||||||
try {
|
try {
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
@@ -5662,6 +5658,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dispatchResume.kt")
|
@TestMetadata("dispatchResume.kt")
|
||||||
public void testDispatchResume() throws Exception {
|
public void testDispatchResume() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt");
|
||||||
@@ -6265,6 +6265,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class DefaultArguments extends AbstractLightAnalysisModeTest {
|
public static class DefaultArguments extends AbstractLightAnalysisModeTest {
|
||||||
|
@TestMetadata("implementedByFake.kt")
|
||||||
|
public void ignoreImplementedByFake() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.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 testAllFilesPresentInDefaultArguments() throws Exception {
|
public void testAllFilesPresentInDefaultArguments() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
@@ -10450,6 +10462,30 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class LocalClasses extends AbstractLightAnalysisModeTest {
|
public static class LocalClasses extends AbstractLightAnalysisModeTest {
|
||||||
|
@TestMetadata("closureOfInnerLocalClass.kt")
|
||||||
|
public void ignoreClosureOfInnerLocalClass() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("closureWithSelfInstantiation.kt")
|
||||||
|
public void ignoreClosureWithSelfInstantiation() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.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 testAllFilesPresentInLocalClasses() throws Exception {
|
public void testAllFilesPresentInLocalClasses() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
@@ -12517,6 +12553,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Properties extends AbstractLightAnalysisModeTest {
|
public static class Properties extends AbstractLightAnalysisModeTest {
|
||||||
|
@TestMetadata("augmentedAssignmentsAndIncrements.kt")
|
||||||
|
public void ignoreAugmentedAssignmentsAndIncrements() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt");
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("accessToPrivateProperty.kt")
|
@TestMetadata("accessToPrivateProperty.kt")
|
||||||
public void testAccessToPrivateProperty() throws Exception {
|
public void testAccessToPrivateProperty() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt");
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractLightAnalysisModeTest> {
|
testClass<AbstractLightAnalysisModeTest> {
|
||||||
model("codegen/box", targetBackend = TargetBackend.JVM)
|
model("codegen/box", targetBackend = TargetBackend.JVM, skipIgnored = true)
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractKapt3BuilderModeBytecodeShapeTest> {
|
testClass<AbstractKapt3BuilderModeBytecodeShapeTest> {
|
||||||
@@ -1436,7 +1436,8 @@ class TestGroup(val testsRoot: String, val testDataRoot: String) {
|
|||||||
testClassName: String? = null,
|
testClassName: String? = null,
|
||||||
targetBackend: TargetBackend = TargetBackend.ANY,
|
targetBackend: TargetBackend = TargetBackend.ANY,
|
||||||
excludeDirs: List<String> = listOf(),
|
excludeDirs: List<String> = listOf(),
|
||||||
filenameStartsLowerCase: Boolean? = null
|
filenameStartsLowerCase: Boolean? = null,
|
||||||
|
skipIgnored: Boolean = false
|
||||||
) {
|
) {
|
||||||
val rootFile = File(testDataRoot + "/" + relativeRootPath)
|
val rootFile = File(testDataRoot + "/" + relativeRootPath)
|
||||||
val compiledPattern = Pattern.compile(pattern)
|
val compiledPattern = Pattern.compile(pattern)
|
||||||
@@ -1444,12 +1445,13 @@ class TestGroup(val testsRoot: String, val testDataRoot: String) {
|
|||||||
testModels.add(
|
testModels.add(
|
||||||
if (singleClass) {
|
if (singleClass) {
|
||||||
if (excludeDirs.isNotEmpty()) error("excludeDirs is unsupported for SingleClassTestModel yet")
|
if (excludeDirs.isNotEmpty()) error("excludeDirs is unsupported for SingleClassTestModel yet")
|
||||||
SingleClassTestModel(rootFile, compiledPattern, filenameStartsLowerCase, testMethod, className, targetBackend)
|
SingleClassTestModel(rootFile, compiledPattern, filenameStartsLowerCase, testMethod, className, targetBackend,
|
||||||
|
skipIgnored)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SimpleTestClassModel(rootFile, recursive, excludeParentDirs,
|
SimpleTestClassModel(rootFile, recursive, excludeParentDirs,
|
||||||
compiledPattern, filenameStartsLowerCase, testMethod, className,
|
compiledPattern, filenameStartsLowerCase, testMethod, className,
|
||||||
targetBackend, excludeDirs)
|
targetBackend, excludeDirs, skipIgnored)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-4
@@ -53,6 +53,8 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private Collection<MethodModel> testMethods;
|
private Collection<MethodModel> testMethods;
|
||||||
|
|
||||||
|
private final boolean skipIgnored;
|
||||||
|
|
||||||
public SimpleTestClassModel(
|
public SimpleTestClassModel(
|
||||||
@NotNull File rootFile,
|
@NotNull File rootFile,
|
||||||
boolean recursive,
|
boolean recursive,
|
||||||
@@ -62,7 +64,8 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
@NotNull String doTestMethodName,
|
@NotNull String doTestMethodName,
|
||||||
@NotNull String testClassName,
|
@NotNull String testClassName,
|
||||||
@NotNull TargetBackend targetBackend,
|
@NotNull TargetBackend targetBackend,
|
||||||
@NotNull Collection<String> excludeDirs
|
@NotNull Collection<String> excludeDirs,
|
||||||
|
boolean skipIgnored
|
||||||
) {
|
) {
|
||||||
this.rootFile = rootFile;
|
this.rootFile = rootFile;
|
||||||
this.recursive = recursive;
|
this.recursive = recursive;
|
||||||
@@ -73,6 +76,7 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
this.targetBackend = targetBackend;
|
this.targetBackend = targetBackend;
|
||||||
this.checkFilenameStartsLowerCase = checkFilenameStartsLowerCase;
|
this.checkFilenameStartsLowerCase = checkFilenameStartsLowerCase;
|
||||||
this.excludeDirs = excludeDirs.isEmpty() ? Collections.emptySet() : new LinkedHashSet<>(excludeDirs);
|
this.excludeDirs = excludeDirs.isEmpty() ? Collections.emptySet() : new LinkedHashSet<>(excludeDirs);
|
||||||
|
this.skipIgnored = skipIgnored;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -91,7 +95,8 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
String innerTestClassName = TestGeneratorUtil.fileNameToJavaIdentifier(file);
|
String innerTestClassName = TestGeneratorUtil.fileNameToJavaIdentifier(file);
|
||||||
children.add(new SimpleTestClassModel(
|
children.add(new SimpleTestClassModel(
|
||||||
file, true, excludeParentDirs, filenamePattern, checkFilenameStartsLowerCase,
|
file, true, excludeParentDirs, filenamePattern, checkFilenameStartsLowerCase,
|
||||||
doTestMethodName, innerTestClassName, targetBackend, excludesStripOneDirectory(file.getName()))
|
doTestMethodName, innerTestClassName, targetBackend, excludesStripOneDirectory(file.getName()),
|
||||||
|
skipIgnored)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +145,7 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
if (testMethods == null) {
|
if (testMethods == null) {
|
||||||
if (!rootFile.isDirectory()) {
|
if (!rootFile.isDirectory()) {
|
||||||
testMethods = Collections.singletonList(new SimpleTestMethodModel(
|
testMethods = Collections.singletonList(new SimpleTestMethodModel(
|
||||||
rootFile, rootFile, doTestMethodName, filenamePattern, checkFilenameStartsLowerCase, targetBackend
|
rootFile, rootFile, doTestMethodName, filenamePattern, checkFilenameStartsLowerCase, targetBackend, skipIgnored
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -157,7 +162,8 @@ public class SimpleTestClassModel implements TestClassModel {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.add(new SimpleTestMethodModel(rootFile, file, doTestMethodName, filenamePattern, checkFilenameStartsLowerCase, targetBackend));
|
result.add(new SimpleTestMethodModel(rootFile, file, doTestMethodName, filenamePattern,
|
||||||
|
checkFilenameStartsLowerCase, targetBackend, skipIgnored));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-2
@@ -45,19 +45,23 @@ public class SimpleTestMethodModel implements TestMethodModel {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private final TargetBackend targetBackend;
|
private final TargetBackend targetBackend;
|
||||||
|
|
||||||
|
private final boolean skipIgnored;
|
||||||
|
|
||||||
public SimpleTestMethodModel(
|
public SimpleTestMethodModel(
|
||||||
@NotNull File rootDir,
|
@NotNull File rootDir,
|
||||||
@NotNull File file,
|
@NotNull File file,
|
||||||
@NotNull String doTestMethodName,
|
@NotNull String doTestMethodName,
|
||||||
@NotNull Pattern filenamePattern,
|
@NotNull Pattern filenamePattern,
|
||||||
@Nullable Boolean checkFilenameStartsLowerCase,
|
@Nullable Boolean checkFilenameStartsLowerCase,
|
||||||
@NotNull TargetBackend targetBackend
|
@NotNull TargetBackend targetBackend,
|
||||||
|
boolean skipIgnored
|
||||||
) {
|
) {
|
||||||
this.rootDir = rootDir;
|
this.rootDir = rootDir;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.doTestMethodName = doTestMethodName;
|
this.doTestMethodName = doTestMethodName;
|
||||||
this.filenamePattern = filenamePattern;
|
this.filenamePattern = filenamePattern;
|
||||||
this.targetBackend = targetBackend;
|
this.targetBackend = targetBackend;
|
||||||
|
this.skipIgnored = skipIgnored;
|
||||||
|
|
||||||
if (checkFilenameStartsLowerCase != null) {
|
if (checkFilenameStartsLowerCase != null) {
|
||||||
char c = file.getName().charAt(0);
|
char c = file.getName().charAt(0);
|
||||||
@@ -124,7 +128,10 @@ public class SimpleTestMethodModel implements TestMethodModel {
|
|||||||
String relativePath = FileUtil.getRelativePath(rootDir, file.getParentFile());
|
String relativePath = FileUtil.getRelativePath(rootDir, file.getParentFile());
|
||||||
unescapedName = relativePath + "-" + StringUtil.capitalize(extractedName);
|
unescapedName = relativePath + "-" + StringUtil.capitalize(extractedName);
|
||||||
}
|
}
|
||||||
return (isIgnoredTargetWithoutCheck(targetBackend, file) ? "ignore" : "test") + StringUtil.capitalize(TestGeneratorUtil.escapeForJavaIdentifier(unescapedName));
|
|
||||||
|
boolean ignored = isIgnoredTargetWithoutCheck(targetBackend, file) ||
|
||||||
|
skipIgnored && isIgnoredTarget(targetBackend, file);
|
||||||
|
return (ignored ? "ignore" : "test") + StringUtil.capitalize(TestGeneratorUtil.escapeForJavaIdentifier(unescapedName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+6
-2
@@ -48,13 +48,16 @@ public class SingleClassTestModel implements TestClassModel {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private Collection<MethodModel> methods;
|
private Collection<MethodModel> methods;
|
||||||
|
|
||||||
|
private final boolean skipIgnored;
|
||||||
|
|
||||||
public SingleClassTestModel(
|
public SingleClassTestModel(
|
||||||
@NotNull File rootFile,
|
@NotNull File rootFile,
|
||||||
@NotNull Pattern filenamePattern,
|
@NotNull Pattern filenamePattern,
|
||||||
@Nullable Boolean checkFilenameStartsLowerCase,
|
@Nullable Boolean checkFilenameStartsLowerCase,
|
||||||
@NotNull String doTestMethodName,
|
@NotNull String doTestMethodName,
|
||||||
@NotNull String testClassName,
|
@NotNull String testClassName,
|
||||||
@NotNull TargetBackend targetBackend
|
@NotNull TargetBackend targetBackend,
|
||||||
|
boolean skipIgnored
|
||||||
) {
|
) {
|
||||||
this.rootFile = rootFile;
|
this.rootFile = rootFile;
|
||||||
this.filenamePattern = filenamePattern;
|
this.filenamePattern = filenamePattern;
|
||||||
@@ -62,6 +65,7 @@ public class SingleClassTestModel implements TestClassModel {
|
|||||||
this.doTestMethodName = doTestMethodName;
|
this.doTestMethodName = doTestMethodName;
|
||||||
this.testClassName = testClassName;
|
this.testClassName = testClassName;
|
||||||
this.targetBackend = targetBackend;
|
this.targetBackend = targetBackend;
|
||||||
|
this.skipIgnored = skipIgnored;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -97,7 +101,7 @@ public class SingleClassTestModel implements TestClassModel {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Collection<TestMethodModel> getTestMethodsFromFile(File file) {
|
private Collection<TestMethodModel> getTestMethodsFromFile(File file) {
|
||||||
return Collections.singletonList(new SimpleTestMethodModel(
|
return Collections.singletonList(new SimpleTestMethodModel(
|
||||||
rootFile, file, doTestMethodName, filenamePattern, checkFilenameStartsLowerCase, targetBackend
|
rootFile, file, doTestMethodName, filenamePattern, checkFilenameStartsLowerCase, targetBackend, skipIgnored
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user