From 8d7b59777cbfa1ad21ae56e10469872e4b7291d3 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 12 Sep 2016 22:27:27 +0300 Subject: [PATCH] Moved and renamed tests --- .../smart/{Lambda1.kt => lambda/1.kt} | 0 .../{Lambda1.kt.after => lambda/1.kt.after} | 0 .../smart/{Lambda2.kt => lambda/2.kt} | 0 .../{Lambda2.kt.after => lambda/2.kt.after} | 0 .../smart/{Lambda3.kt => lambda/3.kt} | 0 .../{Lambda3.kt.after => lambda/3.kt.after} | 0 .../smart/{Lambda4.kt => lambda/4.kt} | 0 .../{Lambda4.kt.after => lambda/4.kt.after} | 0 .../smart/{Lambda5.kt => lambda/5.kt} | 0 .../{Lambda5.kt.after => lambda/5.kt.after} | 0 .../{Lambda6.kt.todo => lambda/6.kt.todo} | 0 .../InsertImport.kt} | 0 .../InsertImport.kt.after} | 0 .../SmartCompletionHandlerTestGenerated.java | 81 ++++++++++--------- 14 files changed, 45 insertions(+), 36 deletions(-) rename idea/idea-completion/testData/handlers/smart/{Lambda1.kt => lambda/1.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda1.kt.after => lambda/1.kt.after} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda2.kt => lambda/2.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda2.kt.after => lambda/2.kt.after} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda3.kt => lambda/3.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda3.kt.after => lambda/3.kt.after} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda4.kt => lambda/4.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda4.kt.after => lambda/4.kt.after} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda5.kt => lambda/5.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda5.kt.after => lambda/5.kt.after} (100%) rename idea/idea-completion/testData/handlers/smart/{Lambda6.kt.todo => lambda/6.kt.todo} (100%) rename idea/idea-completion/testData/handlers/smart/{LambdaInsertImport.kt => lambda/InsertImport.kt} (100%) rename idea/idea-completion/testData/handlers/smart/{LambdaInsertImport.kt.after => lambda/InsertImport.kt.after} (100%) diff --git a/idea/idea-completion/testData/handlers/smart/Lambda1.kt b/idea/idea-completion/testData/handlers/smart/lambda/1.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda1.kt rename to idea/idea-completion/testData/handlers/smart/lambda/1.kt diff --git a/idea/idea-completion/testData/handlers/smart/Lambda1.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/1.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda1.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/1.kt.after diff --git a/idea/idea-completion/testData/handlers/smart/Lambda2.kt b/idea/idea-completion/testData/handlers/smart/lambda/2.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda2.kt rename to idea/idea-completion/testData/handlers/smart/lambda/2.kt diff --git a/idea/idea-completion/testData/handlers/smart/Lambda2.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/2.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda2.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/2.kt.after diff --git a/idea/idea-completion/testData/handlers/smart/Lambda3.kt b/idea/idea-completion/testData/handlers/smart/lambda/3.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda3.kt rename to idea/idea-completion/testData/handlers/smart/lambda/3.kt diff --git a/idea/idea-completion/testData/handlers/smart/Lambda3.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/3.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda3.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/3.kt.after diff --git a/idea/idea-completion/testData/handlers/smart/Lambda4.kt b/idea/idea-completion/testData/handlers/smart/lambda/4.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda4.kt rename to idea/idea-completion/testData/handlers/smart/lambda/4.kt diff --git a/idea/idea-completion/testData/handlers/smart/Lambda4.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/4.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda4.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/4.kt.after diff --git a/idea/idea-completion/testData/handlers/smart/Lambda5.kt b/idea/idea-completion/testData/handlers/smart/lambda/5.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda5.kt rename to idea/idea-completion/testData/handlers/smart/lambda/5.kt diff --git a/idea/idea-completion/testData/handlers/smart/Lambda5.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/5.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda5.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/5.kt.after diff --git a/idea/idea-completion/testData/handlers/smart/Lambda6.kt.todo b/idea/idea-completion/testData/handlers/smart/lambda/6.kt.todo similarity index 100% rename from idea/idea-completion/testData/handlers/smart/Lambda6.kt.todo rename to idea/idea-completion/testData/handlers/smart/lambda/6.kt.todo diff --git a/idea/idea-completion/testData/handlers/smart/LambdaInsertImport.kt b/idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt similarity index 100% rename from idea/idea-completion/testData/handlers/smart/LambdaInsertImport.kt rename to idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt diff --git a/idea/idea-completion/testData/handlers/smart/LambdaInsertImport.kt.after b/idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt.after similarity index 100% rename from idea/idea-completion/testData/handlers/smart/LambdaInsertImport.kt.after rename to idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt.after diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java index 051aecedf00..a9b0a35381a 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java @@ -533,42 +533,6 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion doTest(fileName); } - @TestMetadata("Lambda1.kt") - public void testLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Lambda1.kt"); - doTest(fileName); - } - - @TestMetadata("Lambda2.kt") - public void testLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Lambda2.kt"); - doTest(fileName); - } - - @TestMetadata("Lambda3.kt") - public void testLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Lambda3.kt"); - doTest(fileName); - } - - @TestMetadata("Lambda4.kt") - public void testLambda4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Lambda4.kt"); - doTest(fileName); - } - - @TestMetadata("Lambda5.kt") - public void testLambda5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Lambda5.kt"); - doTest(fileName); - } - - @TestMetadata("LambdaInsertImport.kt") - public void testLambdaInsertImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LambdaInsertImport.kt"); - doTest(fileName); - } - @TestMetadata("LambdaValue1.kt") public void testLambdaValue1() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LambdaValue1.kt"); @@ -898,4 +862,49 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/WhenElse.kt"); doTest(fileName); } + + @TestMetadata("idea/idea-completion/testData/handlers/smart/lambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambda extends AbstractSmartCompletionHandlerTest { + @TestMetadata("1.kt") + public void test1() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/1.kt"); + doTest(fileName); + } + + @TestMetadata("2.kt") + public void test2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/2.kt"); + doTest(fileName); + } + + @TestMetadata("3.kt") + public void test3() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/3.kt"); + doTest(fileName); + } + + @TestMetadata("4.kt") + public void test4() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/4.kt"); + doTest(fileName); + } + + @TestMetadata("5.kt") + public void test5() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/5.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/smart/lambda"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("InsertImport.kt") + public void testInsertImport() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt"); + doTest(fileName); + } + } }