From ce9e7261a7658b834173550739827b08fcfeb123 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 2 Aug 2018 15:51:50 +0300 Subject: [PATCH] Allow kotlin extra files in parameter info tests --- .../kotlin/generators/tests/GenerateTests.kt | 6 +++++- .../generators/tests/GenerateTests.kt.as31 | 6 +++++- .../generators/tests/GenerateTests.kt.as32 | 6 +++++- .../generators/tests/GenerateTests.kt.as33 | 6 +++++- .../ParameterInfoTestGenerated.java | 16 ++++++++-------- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 63e38c5072a..2237deae345 100755 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -226,7 +226,11 @@ fun main(args: Array) { } testClass { - model("parameterInfo", recursive = true, excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib")) + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) } testClass { diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as31 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as31 index 302ca8bae9a..adf4a8a9436 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as31 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as31 @@ -225,7 +225,11 @@ fun main(args: Array) { } testClass { - model("parameterInfo", recursive = true, excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib")) + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) } testClass { diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as32 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as32 index 302ca8bae9a..adf4a8a9436 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as32 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as32 @@ -225,7 +225,11 @@ fun main(args: Array) { } testClass { - model("parameterInfo", recursive = true, excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib")) + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) } testClass { diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as33 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as33 index 9c9084f12e3..37daaeed9c4 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as33 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as33 @@ -217,7 +217,11 @@ fun main(args: Array) { } testClass { - model("parameterInfo", recursive = true, excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib")) + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) } testClass { diff --git a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java index 7e5624df047..18111d56d86 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java @@ -26,7 +26,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInParameterInfo() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib"); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true, "withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib"); } @TestMetadata("idea/testData/parameterInfo/annotations") @@ -38,7 +38,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/annotations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorCall.kt") @@ -66,7 +66,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInArrayAccess() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/arrayAccess"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/arrayAccess"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Overloads.kt") @@ -104,7 +104,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInFunctionCall() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/functionCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/functionCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultValuesFromLib.kt") @@ -352,7 +352,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInTypeArguments() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/typeArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BaseClass.kt") @@ -405,7 +405,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInWithLib1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib1"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaFromLib.kt") @@ -423,7 +423,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInWithLib2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib2"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaSAMFromLib.kt") @@ -441,7 +441,7 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { } public void testAllFilesPresentInWithLib3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib3"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaSAMFromLib.kt")