From aeff3c783e37078621fb28d50555426fbc995982 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 8 Apr 2013 18:18:03 +0400 Subject: [PATCH] Move class completion tests into ordinal tests --- .../{class => basic}/InExpressionNoPrefix.kt | 4 +- .../InExtendTypeAnnotation.kt | 4 +- .../completion/JetBasicJSCompletionTest.java | 10 +++++ .../JetBasicJavaCompletionTest.java | 10 +++++ .../completion/JetClassCompletionTest.java | 45 ------------------- 5 files changed, 24 insertions(+), 49 deletions(-) rename idea/testData/completion/{class => basic}/InExpressionNoPrefix.kt (64%) rename idea/testData/completion/{class => basic}/InExtendTypeAnnotation.kt (60%) delete mode 100644 idea/tests/org/jetbrains/jet/completion/JetClassCompletionTest.java diff --git a/idea/testData/completion/class/InExpressionNoPrefix.kt b/idea/testData/completion/basic/InExpressionNoPrefix.kt similarity index 64% rename from idea/testData/completion/class/InExpressionNoPrefix.kt rename to idea/testData/completion/basic/InExpressionNoPrefix.kt index 83a4c1f0956..443aeedb5af 100644 --- a/idea/testData/completion/class/InExpressionNoPrefix.kt +++ b/idea/testData/completion/basic/InExpressionNoPrefix.kt @@ -4,6 +4,6 @@ class Test { } } -// RUNTIME: 1 // EXIST: Any, Nothing, Unit, Int, Number -// EXIST: Array, Math, Hashable, OutputStream \ No newline at end of file +// EXIST: Array, Hashable +// EXIST_JAVA_ONLY: Math, Thread \ No newline at end of file diff --git a/idea/testData/completion/class/InExtendTypeAnnotation.kt b/idea/testData/completion/basic/InExtendTypeAnnotation.kt similarity index 60% rename from idea/testData/completion/class/InExtendTypeAnnotation.kt rename to idea/testData/completion/basic/InExtendTypeAnnotation.kt index 0137766b071..86fe19bf78e 100644 --- a/idea/testData/completion/class/InExtendTypeAnnotation.kt +++ b/idea/testData/completion/basic/InExtendTypeAnnotation.kt @@ -3,6 +3,6 @@ class Test : { } } -// RUNTIME: 1 // EXIST: Any, Nothing, Unit, Int, Number -// EXIST: Array, Math, Hashable, OutputStream \ No newline at end of file +// EXIST: Array, Hashable +// EXIST_JAVA_ONLY: Math, Thread \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/completion/JetBasicJSCompletionTest.java b/idea/tests/org/jetbrains/jet/completion/JetBasicJSCompletionTest.java index c37c9186192..274df98b2ed 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetBasicJSCompletionTest.java +++ b/idea/tests/org/jetbrains/jet/completion/JetBasicJSCompletionTest.java @@ -173,6 +173,16 @@ public class JetBasicJSCompletionTest extends AbstractJetJSCompletionTest { doTest("idea/testData/completion/basic/InEmptyImport.kt"); } + @TestMetadata("InExpressionNoPrefix.kt") + public void testInExpressionNoPrefix() throws Exception { + doTest("idea/testData/completion/basic/InExpressionNoPrefix.kt"); + } + + @TestMetadata("InExtendTypeAnnotation.kt") + public void testInExtendTypeAnnotation() throws Exception { + doTest("idea/testData/completion/basic/InExtendTypeAnnotation.kt"); + } + @TestMetadata("InFileWithMultiDeclaration.kt") public void testInFileWithMultiDeclaration() throws Exception { doTest("idea/testData/completion/basic/InFileWithMultiDeclaration.kt"); diff --git a/idea/tests/org/jetbrains/jet/completion/JetBasicJavaCompletionTest.java b/idea/tests/org/jetbrains/jet/completion/JetBasicJavaCompletionTest.java index fdc6f187cab..9e2235e2505 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetBasicJavaCompletionTest.java +++ b/idea/tests/org/jetbrains/jet/completion/JetBasicJavaCompletionTest.java @@ -173,6 +173,16 @@ public class JetBasicJavaCompletionTest extends AbstractJavaCompletionTest { doTest("idea/testData/completion/basic/InEmptyImport.kt"); } + @TestMetadata("InExpressionNoPrefix.kt") + public void testInExpressionNoPrefix() throws Exception { + doTest("idea/testData/completion/basic/InExpressionNoPrefix.kt"); + } + + @TestMetadata("InExtendTypeAnnotation.kt") + public void testInExtendTypeAnnotation() throws Exception { + doTest("idea/testData/completion/basic/InExtendTypeAnnotation.kt"); + } + @TestMetadata("InFileWithMultiDeclaration.kt") public void testInFileWithMultiDeclaration() throws Exception { doTest("idea/testData/completion/basic/InFileWithMultiDeclaration.kt"); diff --git a/idea/tests/org/jetbrains/jet/completion/JetClassCompletionTest.java b/idea/tests/org/jetbrains/jet/completion/JetClassCompletionTest.java deleted file mode 100644 index 876c0c61d19..00000000000 --- a/idea/tests/org/jetbrains/jet/completion/JetClassCompletionTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2010-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.jet.completion; - -import com.intellij.codeInsight.completion.CompletionType; -import org.jetbrains.jet.plugin.PluginTestCaseBase; - -import java.io.File; - -public class JetClassCompletionTest extends JetCompletionTestBase { - - public void testInExpressionNoPrefix() { - - doTest(); - } - - public void testInExtendTypeAnnotation() { - doTest(); - } - - @Override - protected CompletionType getCompletionType(String testName, String fileText) { - return CompletionType.BASIC; - } - - @Override - protected String getTestDataPath() { - return new File(PluginTestCaseBase.getTestDataPathBase(), "/completion/class").getPath() + - File.separator; - } -}