remove Jet from names of classes in tests: phase 1
This commit is contained in:
+4
-4
@@ -19,21 +19,21 @@ package org.jetbrains.kotlin.checkers;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestJdkKind;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
public abstract class AbstractJetDiagnosticsWithFullJdkTest extends AbstractJetDiagnosticsTest {
|
||||
public abstract class AbstractDiagnosticsWithFullJdkTest extends AbstractDiagnosticsTest {
|
||||
@Override
|
||||
protected KotlinCoreEnvironment createEnvironment() {
|
||||
File javaFilesDir = createJavaFilesDir();
|
||||
return KotlinCoreEnvironment.createForTests(getTestRootDisposable(),
|
||||
JetTestUtils.compilerConfigurationForTests(
|
||||
KotlinTestUtils.compilerConfigurationForTests(
|
||||
ConfigurationKind.ALL,
|
||||
TestJdkKind.FULL_JDK,
|
||||
Arrays.asList(JetTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(KotlinTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(javaFilesDir)
|
||||
),
|
||||
EnvironmentConfigFiles.JVM_CONFIG_FILES);
|
||||
+6
-6
@@ -53,7 +53,7 @@ import org.jetbrains.kotlin.storage.ExceptionTracker;
|
||||
import org.jetbrains.kotlin.storage.LockBasedStorageManager;
|
||||
import org.jetbrains.kotlin.storage.StorageManager;
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.util.DescriptorValidator;
|
||||
import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator;
|
||||
import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
|
||||
@@ -65,7 +65,7 @@ import static org.jetbrains.kotlin.diagnostics.Errors.*;
|
||||
import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.RECURSIVE;
|
||||
import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.RECURSIVE_ALL;
|
||||
|
||||
public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
public abstract class AbstractDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
|
||||
public static final Function1<String, String> HASH_SANITIZER = new Function1<String, String>() {
|
||||
@Override
|
||||
@@ -171,7 +171,7 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
exceptionFromDynamicCallDescriptorsValidation = e;
|
||||
}
|
||||
|
||||
JetTestUtils.assertEqualsToFile(testDataFile, actualText.toString());
|
||||
KotlinTestUtils.assertEqualsToFile(testDataFile, actualText.toString());
|
||||
|
||||
assertTrue("Diagnostics mismatch. See the output above", ok);
|
||||
|
||||
@@ -202,7 +202,7 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
}
|
||||
|
||||
if (actualText.length() != 0 || expectedFile.exists()) {
|
||||
JetTestUtils.assertEqualsToFile(expectedFile, actualText.toString());
|
||||
KotlinTestUtils.assertEqualsToFile(expectedFile, actualText.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
try {
|
||||
File expectedFile = getLazyLogFile(testDataFile);
|
||||
|
||||
JetTestUtils.assertEqualsToFile(
|
||||
KotlinTestUtils.assertEqualsToFile(
|
||||
expectedFile,
|
||||
lazyOperationsLog.getText(),
|
||||
HASH_SANITIZER
|
||||
@@ -292,7 +292,7 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
"Please ensure you don't render JRE contents to the .txt file. " +
|
||||
"Such tests are hard to maintain, take long time to execute and are subject to sudden unreviewed changes anyway.";
|
||||
|
||||
JetTestUtils.assertEqualsToFile(expectedFile, rootPackageText.toString());
|
||||
KotlinTestUtils.assertEqualsToFile(expectedFile, rootPackageText.toString());
|
||||
}
|
||||
|
||||
public RecursiveDescriptorComparator.Configuration createdAffectedPackagesConfiguration(List<TestFile> testFiles) {
|
||||
+1
-1
@@ -38,7 +38,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class AbstractJetDiagnosticsTestWithJsStdLib extends AbstractJetDiagnosticsTest {
|
||||
public abstract class AbstractDiagnosticsTestWithJsStdLib extends AbstractDiagnosticsTest {
|
||||
private Config config;
|
||||
|
||||
@Override
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.js.facade.MainCallParameters
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.BindingTrace
|
||||
|
||||
public abstract class AbstractJetDiagnosticsTestWithJsStdLibAndBackendCompilation : AbstractJetDiagnosticsTestWithJsStdLib() {
|
||||
public abstract class AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation : AbstractDiagnosticsTestWithJsStdLib() {
|
||||
override fun analyzeModuleContents(
|
||||
moduleContext: ModuleContext,
|
||||
jetFiles: MutableList<KtFile>,
|
||||
+5
-5
@@ -19,23 +19,23 @@ package org.jetbrains.kotlin.checkers;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestJdkKind;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
public abstract class AbstractJetDiagnosticsTestWithStdLib extends AbstractJetDiagnosticsTest {
|
||||
public abstract class AbstractDiagnosticsTestWithStdLib extends AbstractDiagnosticsTest {
|
||||
@Override
|
||||
protected KotlinCoreEnvironment createEnvironment() {
|
||||
File javaFilesDir = createJavaFilesDir();
|
||||
return KotlinCoreEnvironment.createForTests(getTestRootDisposable(),
|
||||
JetTestUtils.compilerConfigurationForTests(
|
||||
KotlinTestUtils.compilerConfigurationForTests(
|
||||
ConfigurationKind.ALL,
|
||||
TestJdkKind.MOCK_JDK,
|
||||
Arrays.asList(JetTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(KotlinTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(javaFilesDir)
|
||||
),
|
||||
EnvironmentConfigFiles.JVM_CONFIG_FILES);
|
||||
EnvironmentConfigFiles.JVM_CONFIG_FILES);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -19,21 +19,21 @@ package org.jetbrains.kotlin.checkers;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestJdkKind;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
public abstract class AbstractJetDiagnosticsWithFullJdkTest extends AbstractJetDiagnosticsTest {
|
||||
public abstract class AbstractDiagnosticsWithFullJdkTest extends AbstractDiagnosticsTest {
|
||||
@Override
|
||||
protected KotlinCoreEnvironment createEnvironment() {
|
||||
File javaFilesDir = createJavaFilesDir();
|
||||
return KotlinCoreEnvironment.createForTests(getTestRootDisposable(),
|
||||
JetTestUtils.compilerConfigurationForTests(
|
||||
KotlinTestUtils.compilerConfigurationForTests(
|
||||
ConfigurationKind.ALL,
|
||||
TestJdkKind.FULL_JDK,
|
||||
Arrays.asList(JetTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(KotlinTestUtils.getAnnotationsJar()),
|
||||
Arrays.asList(javaFilesDir)
|
||||
),
|
||||
EnvironmentConfigFiles.JVM_CONFIG_FILES);
|
||||
+1
-1
@@ -23,7 +23,7 @@ import java.util.ArrayList
|
||||
import java.util.regex.Pattern
|
||||
import kotlin.test.fail
|
||||
|
||||
public class JetCodeConformanceTest : TestCase() {
|
||||
public class CodeConformanceTest : TestCase() {
|
||||
companion object {
|
||||
private val JAVA_FILE_PATTERN = Pattern.compile(".+\\.java")
|
||||
private val SOURCES_FILE_PATTERN = Pattern.compile("(.+\\.java|.+\\.kt|.+\\.js)")
|
||||
+4
-4
@@ -30,23 +30,23 @@ import com.intellij.util.PathUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.KtNodeTypes;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
public abstract class AbstractJetParsingTest extends ParsingTestCase {
|
||||
public abstract class AbstractParsingTest extends ParsingTestCase {
|
||||
static {
|
||||
System.setProperty("idea.platform.prefix", "Idea");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return JetTestUtils.getHomeDirectory();
|
||||
return KotlinTestUtils.getHomeDirectory();
|
||||
}
|
||||
|
||||
public AbstractJetParsingTest() {
|
||||
public AbstractParsingTest() {
|
||||
super(".", "kt", new JetParserDefinition());
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.resolve.ImportPath;
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.junit.Assert;
|
||||
|
||||
import java.io.File;
|
||||
@@ -33,7 +33,7 @@ import java.util.Collection;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class JetPsiUtilTest extends JetLiteFixture {
|
||||
public class KtPsiUtilTest extends KotlinLiteFixture {
|
||||
public void testUnquotedIdentifier() {
|
||||
Assert.assertEquals("", KtPsiUtil.unquoteIdentifier(""));
|
||||
Assert.assertEquals("a2", KtPsiUtil.unquoteIdentifier("a2"));
|
||||
+4
-4
@@ -16,14 +16,14 @@
|
||||
|
||||
package org.jetbrains.kotlin.psi
|
||||
|
||||
import org.junit.Assert
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getReceiverExpression
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture
|
||||
import org.junit.Assert
|
||||
|
||||
public class JetSimpleNameExpressionTest : JetLiteFixture() {
|
||||
public class KtSimpleNameExpressionTest : KotlinLiteFixture() {
|
||||
public fun testGetReceiverExpressionIdentifier() {
|
||||
// Binary Expressions
|
||||
assertReceiver("1 + 2", "1")
|
||||
+4
-4
@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform;
|
||||
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.ScopeUtilsKt;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.tests.di.ContainerForTests;
|
||||
import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
@@ -48,8 +48,8 @@ import java.util.Map;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
public class JetExpectedResolveDataUtil {
|
||||
private JetExpectedResolveDataUtil() {
|
||||
public class ExpectedResolveDataUtil {
|
||||
private ExpectedResolveDataUtil() {
|
||||
}
|
||||
|
||||
public static Map<String, DeclarationDescriptor> prepareDefaultNameToDescriptors(Project project, KotlinCoreEnvironment environment) {
|
||||
@@ -131,7 +131,7 @@ public class JetExpectedResolveDataUtil {
|
||||
Project project,
|
||||
KotlinType... parameterTypes
|
||||
) {
|
||||
ModuleDescriptorImpl emptyModule = JetTestUtils.createEmptyModule();
|
||||
ModuleDescriptorImpl emptyModule = KotlinTestUtils.createEmptyModule();
|
||||
ContainerForTests container = InjectionKt.createContainerForTests(project, emptyModule);
|
||||
emptyModule.setDependencies(emptyModule);
|
||||
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE$);
|
||||
+3
-3
@@ -30,16 +30,16 @@ import org.junit.Assert;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class JetLiteFixture extends KotlinTestWithEnvironment {
|
||||
public abstract class KotlinLiteFixture extends KotlinTestWithEnvironment {
|
||||
@NonNls
|
||||
protected final String myFullDataPath;
|
||||
private KtFile myFile;
|
||||
|
||||
public JetLiteFixture(@NonNls String dataPath) {
|
||||
public KotlinLiteFixture(@NonNls String dataPath) {
|
||||
myFullDataPath = getTestDataPath() + "/" + dataPath;
|
||||
}
|
||||
|
||||
public JetLiteFixture() {
|
||||
public KotlinLiteFixture() {
|
||||
myFullDataPath = getTestDataPath();
|
||||
}
|
||||
|
||||
+3
-3
@@ -98,7 +98,7 @@ import static org.jetbrains.kotlin.cli.jvm.config.JVMConfigurationKeys.MODULE_NA
|
||||
import static org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil.compileKotlinToDirAndGetAnalysisResult;
|
||||
import static org.jetbrains.kotlin.test.ConfigurationKind.ALL;
|
||||
|
||||
public class JetTestUtils {
|
||||
public class KotlinTestUtils {
|
||||
public static final String TEST_GENERATOR_NAME = "org.jetbrains.kotlin.generators.tests.TestsPackage";
|
||||
public static final String PLEASE_REGENERATE_TESTS = "Please regenerate tests (GenerateTests.kt)";
|
||||
|
||||
@@ -284,7 +284,7 @@ public class JetTestUtils {
|
||||
// We suspect sequences of eight consecutive hexadecimal digits to be a package part hash code
|
||||
private static final Pattern STRIP_PACKAGE_PART_HASH_PATTERN = Pattern.compile("\\$([0-9a-f]{8})");
|
||||
|
||||
private JetTestUtils() {
|
||||
private KotlinTestUtils() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -321,7 +321,7 @@ public class JetTestUtils {
|
||||
|
||||
@NotNull
|
||||
public static String getHomeDirectory() {
|
||||
File resourceRoot = PathUtil.getResourcePathForClass(JetTestUtils.class);
|
||||
File resourceRoot = PathUtil.getResourcePathForClass(KotlinTestUtils.class);
|
||||
return FileUtil.toSystemIndependentName(resourceRoot.getParentFile().getParentFile().getParent());
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.types
|
||||
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import java.io.File
|
||||
import org.jetbrains.kotlin.resolve.typeBinding.*
|
||||
@@ -27,9 +27,9 @@ import org.jetbrains.kotlin.psi.KtCallableDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JetTestUtils.*
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils.*
|
||||
|
||||
abstract class AbstractJetTypeBindingTest : JetLiteFixture() {
|
||||
abstract class AbstractTypeBindingTest : KotlinLiteFixture() {
|
||||
override fun createEnvironment() = createEnvironmentWithMockJdk(ConfigurationKind.ALL)
|
||||
|
||||
protected fun doTest(path: String) {
|
||||
+7
-7
@@ -34,8 +34,8 @@ import org.jetbrains.kotlin.resolve.scopes.RedeclarationHandler;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScopeImpl;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.tests.di.ContainerForTests;
|
||||
import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
|
||||
@@ -44,7 +44,7 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.frontend.di.InjectionKt.createLazyResolveSession;
|
||||
|
||||
public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
public class DefaultModalityModifiersTest extends KotlinLiteFixture {
|
||||
private final JetDefaultModalityModifiersTestCase tc = new JetDefaultModalityModifiersTestCase();
|
||||
|
||||
@Override
|
||||
@@ -65,7 +65,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
}
|
||||
|
||||
public class JetDefaultModalityModifiersTestCase {
|
||||
private final ModuleDescriptorImpl root = JetTestUtils.createEmptyModule("<test_root>");
|
||||
private final ModuleDescriptorImpl root = KotlinTestUtils.createEmptyModule("<test_root>");
|
||||
private DescriptorResolver descriptorResolver;
|
||||
private FunctionDescriptorResolver functionDescriptorResolver;
|
||||
private KtScope scope;
|
||||
@@ -127,7 +127,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
KtNamedFunction function = (KtNamedFunction) declarations.get(0);
|
||||
SimpleFunctionDescriptor functionDescriptor =
|
||||
functionDescriptorResolver.resolveFunctionDescriptor(classDescriptor, TypeTestUtilsKt.asLexicalScope(scope), function,
|
||||
JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
|
||||
assertEquals(expectedFunctionModality, functionDescriptor.getModality());
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
List<KtDeclaration> declarations = aClass.getDeclarations();
|
||||
KtProperty property = (KtProperty) declarations.get(0);
|
||||
PropertyDescriptor propertyDescriptor = descriptorResolver.resolvePropertyDescriptor(
|
||||
classDescriptor, TypeTestUtilsKt.asLexicalScope(scope), property, JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
classDescriptor, TypeTestUtilsKt.asLexicalScope(scope), property, KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
|
||||
assertEquals(expectedPropertyModality, propertyDescriptor.getModality());
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
List<KtDeclaration> declarations = aClass.getDeclarations();
|
||||
KtProperty property = (KtProperty) declarations.get(0);
|
||||
PropertyDescriptor propertyDescriptor = descriptorResolver.resolvePropertyDescriptor(
|
||||
classDescriptor, TypeTestUtilsKt.asLexicalScope(scope), property, JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
classDescriptor, TypeTestUtilsKt.asLexicalScope(scope), property, KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
PropertyAccessorDescriptor propertyAccessor = isGetter
|
||||
? propertyDescriptor.getGetter()
|
||||
: propertyDescriptor.getSetter();
|
||||
+5
-5
@@ -28,13 +28,13 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform;
|
||||
import org.jetbrains.kotlin.resolve.scopes.ImportingScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.ScopeUtilsKt;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
|
||||
public class JetOverloadTest extends JetLiteFixture {
|
||||
public class KotlinOverloadTest extends KotlinLiteFixture {
|
||||
|
||||
private final ModuleDescriptor root = JetTestUtils.createEmptyModule("<test_root>");
|
||||
private final ModuleDescriptor root = KotlinTestUtils.createEmptyModule("<test_root>");
|
||||
private FunctionDescriptorResolver functionDescriptorResolver;
|
||||
|
||||
@Override
|
||||
@@ -172,6 +172,6 @@ public class JetOverloadTest extends JetLiteFixture {
|
||||
private FunctionDescriptor makeFunction(String funDecl) {
|
||||
KtNamedFunction function = KtPsiFactoryKt.KtPsiFactory(getProject()).createFunction(funDecl);
|
||||
ImportingScope scope = ScopeUtilsKt.memberScopeAsImportingScope(JvmPlatform.INSTANCE$.getBuiltIns().getBuiltInsPackageScope());
|
||||
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function, JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function, KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -26,13 +26,13 @@ import org.jetbrains.kotlin.resolve.OverridingUtil;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo;
|
||||
import org.jetbrains.kotlin.resolve.scopes.LexicalScope;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
|
||||
public class JetOverridingTest extends JetLiteFixture {
|
||||
public class KotlinOverridingTest extends KotlinLiteFixture {
|
||||
|
||||
private final ModuleDescriptor root = JetTestUtils.createEmptyModule("<test_root>");
|
||||
private final ModuleDescriptor root = KotlinTestUtils.createEmptyModule("<test_root>");
|
||||
private FunctionDescriptorResolver functionDescriptorResolver;
|
||||
|
||||
@Override
|
||||
@@ -168,6 +168,6 @@ public class JetOverridingTest extends JetLiteFixture {
|
||||
KtNamedFunction function = KtPsiFactoryKt.KtPsiFactory(getProject()).createFunction(funDecl);
|
||||
LexicalScope scope = TypeTestUtilsKt.asLexicalScope(root.getBuiltIns().getBuiltInsPackageScope());
|
||||
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function,
|
||||
JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
}
|
||||
}
|
||||
+9
-10
@@ -40,10 +40,9 @@ import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo;
|
||||
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil;
|
||||
import org.jetbrains.kotlin.resolve.scopes.*;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver;
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.ScopeUtilsKt;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetLiteFixture;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.tests.di.ContainerForTests;
|
||||
import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
import org.jetbrains.kotlin.types.checker.KotlinTypeChecker;
|
||||
@@ -53,7 +52,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
public class KotlinTypeCheckerTest extends KotlinLiteFixture {
|
||||
|
||||
private KotlinBuiltIns builtIns;
|
||||
private KtScope scopeWithImports;
|
||||
@@ -61,7 +60,7 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
private ExpressionTypingServices expressionTypingServices;
|
||||
|
||||
|
||||
public JetTypeCheckerTest() {
|
||||
public KotlinTypeCheckerTest() {
|
||||
super("");
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
super.setUp();
|
||||
|
||||
|
||||
ModuleDescriptorImpl module = JetTestUtils.createEmptyModule();
|
||||
ModuleDescriptorImpl module = KotlinTestUtils.createEmptyModule();
|
||||
builtIns = module.getBuiltIns();
|
||||
ContainerForTests container = InjectionKt.createContainerForTests(getProject(), module);
|
||||
module.setDependencies(Collections.singletonList(module));
|
||||
@@ -547,14 +546,14 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
private void assertType(String expression, KotlinType expectedType) {
|
||||
Project project = getProject();
|
||||
KtExpression ktExpression = KtPsiFactoryKt.KtPsiFactory(project).createExpression(expression);
|
||||
KotlinType type = expressionTypingServices.getType(TypeTestUtilsKt.asLexicalScope(scopeWithImports), ktExpression, TypeUtils.NO_EXPECTED_TYPE, DataFlowInfo.EMPTY, JetTestUtils.DUMMY_TRACE);
|
||||
KotlinType type = expressionTypingServices.getType(TypeTestUtilsKt.asLexicalScope(scopeWithImports), ktExpression, TypeUtils.NO_EXPECTED_TYPE, DataFlowInfo.EMPTY, KotlinTestUtils.DUMMY_TRACE);
|
||||
assertTrue(type + " != " + expectedType, type.equals(expectedType));
|
||||
}
|
||||
|
||||
private void assertErrorType(String expression) {
|
||||
Project project = getProject();
|
||||
KtExpression ktExpression = KtPsiFactoryKt.KtPsiFactory(project).createExpression(expression);
|
||||
KotlinType type = expressionTypingServices.safeGetType(TypeTestUtilsKt.asLexicalScope(scopeWithImports), ktExpression, TypeUtils.NO_EXPECTED_TYPE, DataFlowInfo.EMPTY, JetTestUtils.DUMMY_TRACE);
|
||||
KotlinType type = expressionTypingServices.safeGetType(TypeTestUtilsKt.asLexicalScope(scopeWithImports), ktExpression, TypeUtils.NO_EXPECTED_TYPE, DataFlowInfo.EMPTY, KotlinTestUtils.DUMMY_TRACE);
|
||||
assertTrue("Error type expected but " + type + " returned", type.isError());
|
||||
}
|
||||
|
||||
@@ -595,7 +594,7 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
private KtScope getDeclarationsScope(String path) throws IOException {
|
||||
ModuleDescriptor moduleDescriptor = LazyResolveTestUtil.resolve(
|
||||
getProject(),
|
||||
Collections.singletonList(JetTestUtils.loadJetFile(getProject(), new File(path))),
|
||||
Collections.singletonList(KotlinTestUtils.loadJetFile(getProject(), new File(path))),
|
||||
getEnvironment()
|
||||
);
|
||||
|
||||
@@ -635,6 +634,6 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
}
|
||||
|
||||
private KotlinType makeType(KtScope scope, String typeStr) {
|
||||
return typeResolver.resolveType(TypeTestUtilsKt.asLexicalScope(scope), KtPsiFactoryKt.KtPsiFactory(getProject()).createType(typeStr), JetTestUtils.DUMMY_TRACE, true);
|
||||
return typeResolver.resolveType(TypeTestUtilsKt.asLexicalScope(scope), KtPsiFactoryKt.KtPsiFactory(getProject()).createType(typeStr), KotlinTestUtils.DUMMY_TRACE, true);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||
import java.io.File
|
||||
|
||||
public abstract class JetFixtureCompletionBaseTestCase : JetLightCodeInsightFixtureTestCase() {
|
||||
public abstract class KotlinFixtureCompletionBaseTestCase : JetLightCodeInsightFixtureTestCase() {
|
||||
public abstract fun getPlatform(): TargetPlatform
|
||||
|
||||
protected open fun complete(completionType: CompletionType, invocationCount: Int): Array<LookupElement>?
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.jetbrains.kotlin.test.InTextDirectivesUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class JetConfidenceTest extends LightCompletionTestCase {
|
||||
public class KotlinConfidenceTest extends LightCompletionTestCase {
|
||||
private static final String TYPE_DIRECTIVE_PREFIX = "// TYPE:";
|
||||
|
||||
public void testCompleteOnDotOutOfRanges() {
|
||||
+2
-5
@@ -20,23 +20,20 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleType;
|
||||
import com.intellij.openapi.module.StdModuleTypes;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.ContentEntry;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.roots.ui.configuration.libraryEditor.NewLibraryEditor;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class JetJdkAndLibraryProjectDescriptor extends JetLightProjectDescriptor {
|
||||
public class KotlinJdkAndLibraryProjectDescriptor extends KotlinLightProjectDescriptor {
|
||||
public static final String LIBRARY_NAME = "myLibrary";
|
||||
|
||||
private final File libraryFile;
|
||||
|
||||
public JetJdkAndLibraryProjectDescriptor(File libraryFile) {
|
||||
public KotlinJdkAndLibraryProjectDescriptor(File libraryFile) {
|
||||
assert libraryFile.exists() : "Library file doesn't exist: " + libraryFile.getAbsolutePath();
|
||||
this.libraryFile = libraryFile;
|
||||
}
|
||||
+4
-4
@@ -33,14 +33,14 @@ import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.apache.log4j.Logger
|
||||
import org.jetbrains.kotlin.idea.actions.internal.KotlinInternalMode
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.jetbrains.kotlin.utils.rethrow
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
|
||||
public abstract class JetLightCodeInsightFixtureTestCase : LightCodeInsightFixtureTestCase() {
|
||||
public abstract class KotlinLightCodeInsightFixtureTestCase : LightCodeInsightFixtureTestCase() {
|
||||
private var kotlinInternalModeOriginalValue = false
|
||||
|
||||
private val exceptions = ArrayList<Throwable>()
|
||||
@@ -48,7 +48,7 @@ public abstract class JetLightCodeInsightFixtureTestCase : LightCodeInsightFixtu
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
(StartupManager.getInstance(getProject()) as StartupManagerImpl).runPostStartupActivities()
|
||||
VfsRootAccess.allowRootAccess(JetTestUtils.getHomeDirectory())
|
||||
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
|
||||
KotlinInternalMode.enabled = true
|
||||
@@ -69,7 +69,7 @@ public abstract class JetLightCodeInsightFixtureTestCase : LightCodeInsightFixtu
|
||||
LoggedErrorProcessor.restoreDefaultProcessor()
|
||||
|
||||
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
|
||||
VfsRootAccess.disallowRootAccess(JetTestUtils.getHomeDirectory())
|
||||
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
|
||||
|
||||
unInvalidateBuiltinsAndStdLib(getProject()) {
|
||||
super.tearDown()
|
||||
+3
-3
@@ -25,11 +25,11 @@ import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JetLightProjectDescriptor extends LightProjectDescriptor {
|
||||
protected JetLightProjectDescriptor() {
|
||||
public class KotlinLightProjectDescriptor extends LightProjectDescriptor {
|
||||
protected KotlinLightProjectDescriptor() {
|
||||
}
|
||||
|
||||
public static final JetLightProjectDescriptor INSTANCE = new JetLightProjectDescriptor();
|
||||
public static final KotlinLightProjectDescriptor INSTANCE = new KotlinLightProjectDescriptor();
|
||||
|
||||
@Override
|
||||
public ModuleType getModuleType() {
|
||||
+3
-3
@@ -18,10 +18,10 @@ package org.jetbrains.kotlin.idea.test;
|
||||
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
|
||||
|
||||
public class JetWithJdkAndRuntimeLightProjectDescriptor extends JetJdkAndLibraryProjectDescriptor {
|
||||
protected JetWithJdkAndRuntimeLightProjectDescriptor() {
|
||||
public class KotlinWithJdkAndRuntimeLightProjectDescriptor extends KotlinJdkAndLibraryProjectDescriptor {
|
||||
protected KotlinWithJdkAndRuntimeLightProjectDescriptor() {
|
||||
super(ForTestCompileRuntime.runtimeJarForTests());
|
||||
}
|
||||
|
||||
public static final JetWithJdkAndRuntimeLightProjectDescriptor INSTANCE = new JetWithJdkAndRuntimeLightProjectDescriptor();
|
||||
public static final KotlinWithJdkAndRuntimeLightProjectDescriptor INSTANCE = new KotlinWithJdkAndRuntimeLightProjectDescriptor();
|
||||
}
|
||||
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.addImport;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -32,258 +32,258 @@ import java.util.regex.Pattern;
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class AddImportTestGenerated extends AbstractAddImportTest {
|
||||
public void testAllFilesPresentInAddImport() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/addImport"), Pattern.compile("^([^\\.]+)\\.kt$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/addImport"), Pattern.compile("^([^\\.]+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("CannotImportClass1.kt")
|
||||
public void testCannotImportClass1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CannotImportClass2.kt")
|
||||
public void testCannotImportClass2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassAlreadyImported1.kt")
|
||||
public void testClassAlreadyImported1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassAlreadyImported2.kt")
|
||||
public void testClassAlreadyImported2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Comments.kt")
|
||||
public void testComments() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/Comments.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/Comments.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("CommentsNoPackageDirective.kt")
|
||||
public void testCommentsNoPackageDirective() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/CommentsNoPackageDirective.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CommentsNoPackageDirective.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage1.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage2.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage3.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage3() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage3.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage4.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage4() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage5.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage5() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage5.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage5.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsAndHasUsage6.kt")
|
||||
public void testConflictingNameAppearsAndHasUsage6() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage6.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage6.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsButUsageIsQualified.kt")
|
||||
public void testConflictingNameAppearsButUsageIsQualified() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsButUsageIsQualified.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsButUsageIsQualified.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsFalseUsage.kt")
|
||||
public void testConflictingNameAppearsFalseUsage() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsFalseUsage2.kt")
|
||||
public void testConflictingNameAppearsFalseUsage2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameAppearsNoUsage.kt")
|
||||
public void testConflictingNameAppearsNoUsage() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsNoUsage.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsNoUsage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameHasExplicitImportAlready.kt")
|
||||
public void testConflictingNameHasExplicitImportAlready() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameHasExplicitImportAlready.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameHasExplicitImportAlready.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameNoAllUnderImport.kt")
|
||||
public void testConflictingNameNoAllUnderImport() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameNoAllUnderImport2.kt")
|
||||
public void testConflictingNameNoAllUnderImport2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictingNameNoAllUnderImport3.kt")
|
||||
public void testConflictingNameNoAllUnderImport3() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport3.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("DropExplicitImports.kt")
|
||||
public void testDropExplicitImports() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("DropExplicitImports2.kt")
|
||||
public void testDropExplicitImports2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionAlreadyImported1.kt")
|
||||
public void testFunctionAlreadyImported1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionAlreadyImported2.kt")
|
||||
public void testFunctionAlreadyImported2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportClassSimple.kt")
|
||||
public void testImportClassSimple() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportClassSimple.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportClassSimple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportClassWhenFunctionImported.kt")
|
||||
public void testImportClassWhenFunctionImported() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportClassWhenFunctionImported.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportClassWhenFunctionImported.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportEnumMember1.kt")
|
||||
public void testImportEnumMember1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportEnumMember2.kt")
|
||||
public void testImportEnumMember2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportFromObject.kt")
|
||||
public void testImportFromObject() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportFromObject.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportFromObject.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportFunctionBug.kt")
|
||||
public void testImportFunctionBug() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportFunctionBug.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportFunctionBug.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportNestedClass.kt")
|
||||
public void testImportNestedClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportNestedClass.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportNestedClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ImportSecondFunction.kt")
|
||||
public void testImportSecondFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/ImportSecondFunction.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportSecondFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("KeywordNames.kt")
|
||||
public void testKeywordNames() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/KeywordNames.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/KeywordNames.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NameCountForStarNotReached.kt")
|
||||
public void testNameCountForStarNotReached() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarNotReached.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarNotReached.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NameCountForStarReached.kt")
|
||||
public void testNameCountForStarReached() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarReached.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarReached.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoConflictingNameForInaccessibleClass1.kt")
|
||||
public void testNoConflictingNameForInaccessibleClass1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoConflictingNameForInaccessibleClass2.kt")
|
||||
public void testNoConflictingNameForInaccessibleClass2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NoNeedToImportStandardClass.kt")
|
||||
public void testNoNeedToImportStandardClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NoNeedToImportStandardClass.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoNeedToImportStandardClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PackageDoesNotConflictWithClass.kt")
|
||||
public void testPackageDoesNotConflictWithClass() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/PackageDoesNotConflictWithClass.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PackageDoesNotConflictWithClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PropertyAlreadyImported1.kt")
|
||||
public void testPropertyAlreadyImported1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported1.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PropertyAlreadyImported2.kt")
|
||||
public void testPropertyAlreadyImported2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported2.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("StdlibImportsLast.kt")
|
||||
public void testStdlibImportsLast() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/StdlibImportsLast.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/StdlibImportsLast.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinStdJSProjectDescriptor;
|
||||
|
||||
public abstract class AbstractJetJsCheckerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractJsCheckerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public abstract class AbstractJetPsiCheckerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractPsiCheckerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public void doTest(@NotNull String filePath) throws Exception {
|
||||
myFixture.configureByFile(filePath);
|
||||
checkHighlighting(true, false, false);
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.checkers
|
||||
|
||||
import com.intellij.codeInspection.ex.EntryPointsManagerBase
|
||||
|
||||
public class JetPsiCheckerCustomTest : AbstractJetPsiCheckerTest() {
|
||||
public class PsiCheckerCustomTest : AbstractPsiCheckerTest() {
|
||||
public fun testNoUnusedParameterWhenCustom() {
|
||||
val testAnnotation = "MyTestAnnotation"
|
||||
EntryPointsManagerBase.getInstance(getProject()).ADDITIONAL_ANNOTATIONS.add(testAnnotation)
|
||||
+3
-3
@@ -61,7 +61,7 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.idea.util.ProjectRootsUtil;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
@@ -70,7 +70,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractJetFindUsagesTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractFindUsagesTest extends JetLightCodeInsightFixtureTestCase {
|
||||
|
||||
public static final UsageViewPresentation USAGE_VIEW_PRESENTATION = new UsageViewPresentation();
|
||||
|
||||
@@ -430,7 +430,7 @@ public abstract class AbstractJetFindUsagesTest extends JetLightCodeInsightFixtu
|
||||
};
|
||||
|
||||
Collection<String> finalUsages = Ordering.natural().sortedCopy(Collections2.transform(filteredUsages, convertToString));
|
||||
JetTestUtils.assertEqualsToFile(new File(rootPath, prefix + "results.txt"), StringUtil.join(finalUsages, "\n"));
|
||||
KotlinTestUtils.assertEqualsToFile(new File(rootPath, prefix + "results.txt"), StringUtil.join(finalUsages, "\n"));
|
||||
}
|
||||
|
||||
protected Collection<UsageInfo> findUsages(
|
||||
+4
-4
@@ -35,7 +35,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.SettingsConfigurator;
|
||||
|
||||
import java.io.File;
|
||||
@@ -44,7 +44,7 @@ import java.util.Map;
|
||||
|
||||
// Based on from com.intellij.psi.formatter.java.AbstractJavaFormatterTest
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public abstract class AbstractJetFormatterTest extends LightIdeaTestCase {
|
||||
public abstract class AbstractFormatterTest extends LightIdeaTestCase {
|
||||
|
||||
protected enum Action {REFORMAT, INDENT}
|
||||
|
||||
@@ -124,9 +124,9 @@ public abstract class AbstractJetFormatterTest extends LightIdeaTestCase {
|
||||
fail("Don't expect the document to be null");
|
||||
return;
|
||||
}
|
||||
JetTestUtils.assertEqualsToFile(fileAfter, document.getText());
|
||||
KotlinTestUtils.assertEqualsToFile(fileAfter, document.getText());
|
||||
manager.commitDocument(document);
|
||||
JetTestUtils.assertEqualsToFile(fileAfter, file.getText());
|
||||
KotlinTestUtils.assertEqualsToFile(fileAfter, file.getText());
|
||||
}
|
||||
|
||||
public void doTest(@NotNull String expectedFileNameWithExtension) throws Exception {
|
||||
+3
-3
@@ -23,12 +23,12 @@ import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.SettingsConfigurator;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public abstract class AbstractJetTypingIndentationTestBase extends LightCodeInsightTestCase {
|
||||
public abstract class AbstractTypingIndentationTestBase extends LightCodeInsightTestCase {
|
||||
public void doNewlineTest(String afterFilePath) throws Exception {
|
||||
doNewlineTest(afterFilePath, false);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public abstract class AbstractJetTypingIndentationTestBase extends LightCodeInsi
|
||||
int offset = caretModel.getOffset();
|
||||
String actualTextWithCaret = new StringBuilder(getFile().getText()).insert(offset, EditorTestUtil.CARET_TAG).toString();
|
||||
|
||||
JetTestUtils.assertEqualsToFile(new File(afterFilePath), actualTextWithCaret);
|
||||
KotlinTestUtils.assertEqualsToFile(new File(afterFilePath), actualTextWithCaret);
|
||||
}
|
||||
|
||||
public static CodeStyleSettings getSettings() {
|
||||
+90
-70
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.formatter;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -28,302 +28,313 @@ import java.util.regex.Pattern;
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JetTypingIndentationTestBaseGenerated extends AbstractJetTypingIndentationTestBase {
|
||||
public class TypingIndentationTestBaseGenerated extends AbstractTypingIndentationTestBase {
|
||||
@TestMetadata("idea/testData/indentationOnNewline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DirectSettings extends AbstractJetTypingIndentationTestBase {
|
||||
public static class DirectSettings extends AbstractTypingIndentationTestBase {
|
||||
@TestMetadata("AfterCatch.after.kt")
|
||||
public void testAfterCatch() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterCatch.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterCatch.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AfterClassNameBeforeFun.after.kt")
|
||||
public void testAfterClassNameBeforeFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterClassNameBeforeFun.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterClassNameBeforeFun.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AfterFinally.after.kt")
|
||||
public void testAfterFinally() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterFinally.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterFinally.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AfterImport.after.kt")
|
||||
public void testAfterImport() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterImport.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterImport.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AfterTry.after.kt")
|
||||
public void testAfterTry() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterTry.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterTry.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDirectSettings() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("AssignmentAfterEq.after.kt")
|
||||
public void testAssignmentAfterEq() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("BinaryWithTypeExpressions.after.kt")
|
||||
public void testBinaryWithTypeExpressions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConsecutiveCallsAfterDot.after.kt")
|
||||
public void testConsecutiveCallsAfterDot() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsAfterDot.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsAfterDot.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConsecutiveCallsInSaeCallsMiddle.after.kt")
|
||||
public void testConsecutiveCallsInSaeCallsMiddle() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSaeCallsMiddle.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSaeCallsMiddle.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ConsecutiveCallsInSafeCallsEnd.after.kt")
|
||||
public void testConsecutiveCallsInSafeCallsEnd() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSafeCallsEnd.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSafeCallsEnd.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("DoInFun.after.kt")
|
||||
public void testDoInFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/DoInFun.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/DoInFun.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EmptyParameters.after.kt")
|
||||
public void testEmptyParameters() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/EmptyParameters.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/EmptyParameters.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("For.after.kt")
|
||||
public void testFor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/For.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/For.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionBlock.after.kt")
|
||||
public void testFunctionBlock() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionBlock.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionBlock.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionWithInference.after.kt")
|
||||
public void testFunctionWithInference() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionWithInference.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionWithInference.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("If.after.kt")
|
||||
public void testIf() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/If.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/If.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionInMiddle.after.kt")
|
||||
public void testInBinaryExpressionInMiddle() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionUnfinished.after.kt")
|
||||
public void testInBinaryExpressionUnfinished() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionsBeforeCloseParenthesis.after.kt")
|
||||
public void testInBinaryExpressionsBeforeCloseParenthesis() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListAfterColon.after.kt")
|
||||
public void testInDelegationListAfterColon() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListAfterComma.after.kt")
|
||||
public void testInDelegationListAfterComma() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListNotEmpty.after.kt")
|
||||
public void testInDelegationListNotEmpty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumAfterSemicolon.after.kt")
|
||||
public void testInEnumAfterSemicolon() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumInitializerListAfterComma.after.kt")
|
||||
public void testInEnumInitializerListAfterComma() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumInitializerListNotEmpty.after.kt")
|
||||
public void testInEnumInitializerListNotEmpty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InExpressionsParentheses.after.kt")
|
||||
public void testInExpressionsParentheses() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InExpressionsParenthesesBeforeOperand.after.kt")
|
||||
public void testInExpressionsParenthesesBeforeOperand() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLabmdaAfterArrow.after.kt")
|
||||
public void testInLabmdaAfterArrow() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLabmdaAfterArrow.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLabmdaAfterArrow.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaAfterArrowWithSpaces.after.kt")
|
||||
public void testInLambdaAfterArrowWithSpaces() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaAfterArrowWithSpaces.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaAfterArrowWithSpaces.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaBeforeParams.after.kt")
|
||||
public void testInLambdaBeforeParams() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaBeforeParams.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaBeforeParams.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaInsideChainCallSameLine.after.kt")
|
||||
public void testInLambdaInsideChainCallSameLine() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLine.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLine.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaInsideChainCallSameLineWithSpaces.after.kt")
|
||||
public void testInLambdaInsideChainCallSameLineWithSpaces() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLineWithSpaces.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLineWithSpaces.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaInsideChainCallWithNewLine.after.kt")
|
||||
public void testInLambdaInsideChainCallWithNewLine() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLine.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLine.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InLambdaInsideChainCallWithNewLineWithSpaces.after.kt")
|
||||
public void testInLambdaInsideChainCallWithNewLineWithSpaces() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLineWithSpaces.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLineWithSpaces.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InMultilineLambdaAfterArrow.after.kt")
|
||||
public void testInMultilineLambdaAfterArrow() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InMultilineLambdaAfterArrow.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InMultilineLambdaAfterArrow.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("IsExpressionAfterIs.after.kt")
|
||||
public void testIsExpressionAfterIs() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultideclarationAfterEq.after.kt")
|
||||
public void testMultideclarationAfterEq() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationAfterEq.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationAfterEq.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MultideclarationBeforeEq.after.kt")
|
||||
public void testMultideclarationBeforeEq() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationBeforeEq.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationBeforeEq.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("NotFirstParameter.after.kt")
|
||||
public void testNotFirstParameter() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/NotFirstParameter.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/NotFirstParameter.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PropertyWithInference.after.kt")
|
||||
public void testPropertyWithInference() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/PropertyWithInference.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/PropertyWithInference.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnContinue.after.kt")
|
||||
public void testReturnContinue() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ReturnContinue.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ReturnContinue.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SettingAlignMultilineParametersInCalls.after.kt")
|
||||
public void testSettingAlignMultilineParametersInCalls() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("While.after.kt")
|
||||
public void testWhile() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/While.after.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/While.after.kt");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/indentationOnNewline/script")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Script extends AbstractJetTypingIndentationTestBase {
|
||||
public static class Script extends AbstractTypingIndentationTestBase {
|
||||
public void testAllFilesPresentInScript() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline/script"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline/script"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("ScriptAfterExpression.after.kts")
|
||||
public void testScriptAfterExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterExpression.after.kts");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterExpression.after.kts");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ScriptAfterFun.after.kts")
|
||||
public void testScriptAfterFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterFun.after.kts");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterFun.after.kts");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ScriptAfterImport.after.kts")
|
||||
public void testScriptAfterImport() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterImport.after.kts");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterImport.after.kts");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ScriptInsideFun.after.kts")
|
||||
public void testScriptInsideFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptInsideFun.after.kts");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptInsideFun.after.kts");
|
||||
doNewlineTest(fileName);
|
||||
}
|
||||
}
|
||||
@@ -332,98 +343,107 @@ public class JetTypingIndentationTestBaseGenerated extends AbstractJetTypingInde
|
||||
@TestMetadata("idea/testData/indentationOnNewline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InvertedSettings extends AbstractJetTypingIndentationTestBase {
|
||||
public static class InvertedSettings extends AbstractTypingIndentationTestBase {
|
||||
public void testAllFilesPresentInInvertedSettings() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("AssignmentAfterEq.after.inv.kt")
|
||||
public void testAssignmentAfterEq() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("BinaryWithTypeExpressions.after.inv.kt")
|
||||
public void testBinaryWithTypeExpressions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionInMiddle.after.inv.kt")
|
||||
public void testInBinaryExpressionInMiddle() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionUnfinished.after.inv.kt")
|
||||
public void testInBinaryExpressionUnfinished() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt")
|
||||
public void testInBinaryExpressionsBeforeCloseParenthesis() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListAfterColon.after.inv.kt")
|
||||
public void testInDelegationListAfterColon() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListAfterComma.after.inv.kt")
|
||||
public void testInDelegationListAfterComma() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InDelegationListNotEmpty.after.inv.kt")
|
||||
public void testInDelegationListNotEmpty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumAfterSemicolon.after.inv.kt")
|
||||
public void testInEnumAfterSemicolon() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumInitializerListAfterComma.after.inv.kt")
|
||||
public void testInEnumInitializerListAfterComma() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InEnumInitializerListNotEmpty.after.inv.kt")
|
||||
public void testInEnumInitializerListNotEmpty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InExpressionsParentheses.after.inv.kt")
|
||||
public void testInExpressionsParentheses() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("InExpressionsParenthesesBeforeOperand.after.inv.kt")
|
||||
public void testInExpressionsParenthesesBeforeOperand() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("IsExpressionAfterIs.after.inv.kt")
|
||||
public void testIsExpressionAfterIs() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.inv.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SettingAlignMultilineParametersInCalls.after.inv.kt")
|
||||
public void testSettingAlignMultilineParametersInCalls() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.inv.kt");
|
||||
String fileName = KotlinTestUtils
|
||||
.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.inv.kt");
|
||||
doNewlineTestWithInvert(fileName);
|
||||
}
|
||||
|
||||
+4
-4
@@ -35,12 +35,12 @@ import org.jetbrains.kotlin.idea.test.JetLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import java.io.File
|
||||
import kotlin.test.assertFalse
|
||||
import java.util.*
|
||||
|
||||
public abstract class AbstractJetInspectionTest: JetLightCodeInsightFixtureTestCase() {
|
||||
public abstract class AbstractInspectionTest : JetLightCodeInsightFixtureTestCase() {
|
||||
companion object {
|
||||
val ENTRY_POINT_ANNOTATION = "test.anno.EntryPoint"
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public abstract class AbstractJetInspectionTest: JetLightCodeInsightFixtureTestC
|
||||
val srcDir = inspectionsTestDir.getParentFile()!!
|
||||
|
||||
with(myFixture) {
|
||||
setTestDataPath("${JetTestUtils.getHomeDirectory()}/$srcDir")
|
||||
setTestDataPath("${KotlinTestUtils.getHomeDirectory()}/$srcDir")
|
||||
|
||||
val afterFiles = srcDir.listFiles { it.name == "inspectionData" }?.single()?.listFiles { it.extension == "after" } ?: emptyArray()
|
||||
val psiFiles = srcDir.walkTopDown().filter { it.name != "inspectionData" }.map {
|
||||
@@ -133,7 +133,7 @@ public abstract class AbstractJetInspectionTest: JetLightCodeInsightFixtureTestC
|
||||
|
||||
for (filePath in afterFiles) {
|
||||
val kotlinFile = psiFiles.first { filePath.name == it.name + ".after" }
|
||||
JetTestUtils.assertEqualsToFile(filePath, kotlinFile.text)
|
||||
KotlinTestUtils.assertEqualsToFile(filePath, kotlinFile.text)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.idea.test.KotlinMultiFileTestCase
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import java.io.File
|
||||
|
||||
public abstract class AbstractJetMultiFileInspectionTest: KotlinMultiFileTestCase() {
|
||||
public abstract class AbstractMultiFileInspectionTest : KotlinMultiFileTestCase() {
|
||||
init {
|
||||
myDoCompare = false
|
||||
}
|
||||
+1
-1
@@ -57,7 +57,7 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public abstract class AbstractJetPositionManagerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractPositionManagerTest extends JetLightCodeInsightFixtureTestCase {
|
||||
// Breakpoint is given as a line comment on a specific line, containing the regexp to match the name of the class where that line
|
||||
// can be found. This pattern matches against these line comments and saves the class name in the first group
|
||||
private static final Pattern BREAKPOINT_PATTERN = Pattern.compile("^.*//\\s*(.+)\\s*$");
|
||||
+25
-25
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.idea.debugger.evaluate;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -34,132 +34,132 @@ public class CodeFragmentHighlightingTestGenerated extends AbstractCodeFragmentH
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CodeFragments extends AbstractCodeFragmentHighlightingTest {
|
||||
public void testAllFilesPresentInCodeFragments() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryExpression.kt")
|
||||
public void testBinaryExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/binaryExpression.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/binaryExpression.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("blockCodeFragment.kt")
|
||||
public void testBlockCodeFragment() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/blockCodeFragment.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/blockCodeFragment.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("callExpression.kt")
|
||||
public void testCallExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/callExpression.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/callExpression.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classHeader.kt")
|
||||
public void testClassHeader() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeader.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeader.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classHeaderWithTypeArguments.kt")
|
||||
public void testClassHeaderWithTypeArguments() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeaderWithTypeArguments.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeaderWithTypeArguments.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("contextElementAsStatement.kt")
|
||||
public void testContextElementAsStatement() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/contextElementAsStatement.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/contextElementAsStatement.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("elementAtIfWithoutBraces.kt")
|
||||
public void testElementAtIfWithoutBraces() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtIfWithoutBraces.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtIfWithoutBraces.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("elementAtWhenBranch.kt")
|
||||
public void testElementAtWhenBranch() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtWhenBranch.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtWhenBranch.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localVariables.kt")
|
||||
public void testLocalVariables() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariables.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariables.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localVariablesOnReturn.kt")
|
||||
public void testLocalVariablesOnReturn() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariablesOnReturn.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariablesOnReturn.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructor.kt")
|
||||
public void testPrimaryConstructor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/primaryConstructor.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/primaryConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateFunArgumentsResolve.kt")
|
||||
public void testPrivateFunArgumentsResolve() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunArgumentsResolve.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunArgumentsResolve.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateFunTypeArguments.kt")
|
||||
public void testPrivateFunTypeArguments() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunTypeArguments.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunTypeArguments.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateMember.kt")
|
||||
public void testPrivateMember() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateMember.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateMember.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("protectedMember.kt")
|
||||
public void testProtectedMember() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/protectedMember.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/protectedMember.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("secondaryConstructor.kt")
|
||||
public void testSecondaryConstructor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructor.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructor.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("secondaryConstructorWithoutBraces.kt")
|
||||
public void testSecondaryConstructorWithoutBraces() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructorWithoutBraces.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructorWithoutBraces.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNameExpression.kt")
|
||||
public void testSimpleNameExpression() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/simpleNameExpression.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/simpleNameExpression.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("smartCasts.kt")
|
||||
public void testSmartCasts() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/smartCasts.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/smartCasts.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withoutBodyFunction.kt")
|
||||
public void testWithoutBodyFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyFunction.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withoutBodyProperty.kt")
|
||||
public void testWithoutBodyProperty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyProperty.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyProperty.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
@@ -169,12 +169,12 @@ public class CodeFragmentHighlightingTestGenerated extends AbstractCodeFragmentH
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Imports extends AbstractCodeFragmentHighlightingTest {
|
||||
public void testAllFilesPresentInImports() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments/imports"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments/imports"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("hashMap.kt")
|
||||
public void testHashMap() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/checker/codeFragments/imports/hashMap.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/imports/hashMap.kt");
|
||||
doTestWithImport(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.test.util.JetTestUtilsKt;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractJetQuickDocProviderTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractQuickDocProviderTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public void doTest(@NotNull String path) throws Exception {
|
||||
JetTestUtilsKt.configureWithExtraFile(myFixture, path, "_Data");
|
||||
|
||||
+2
-2
@@ -24,13 +24,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.asJava.KtLightClass;
|
||||
import org.jetbrains.kotlin.asJava.KtLightMethod;
|
||||
import org.jetbrains.kotlin.asJava.LightClassUtil;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.name.SpecialNames;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
|
||||
public class JetJavaFacadeTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
+2
-2
@@ -19,13 +19,13 @@ package org.jetbrains.kotlin.idea.navigation;
|
||||
import com.intellij.codeInsight.navigation.GotoTargetHandler;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class JetGotoImplementationMultifileTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public class KotlinGotoImplementationMultifileTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
public void testImplementFunInJava() throws Exception {
|
||||
doKotlinJavaTest();
|
||||
}
|
||||
+7
-7
@@ -51,14 +51,14 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||
import org.jetbrains.kotlin.renderer.DescriptorRenderer
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.util.findElementByCommentPrefix
|
||||
import org.jetbrains.kotlin.utils.emptyOrSingletonList
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
public abstract class AbstractJetExtractionTest() : JetLightCodeInsightFixtureTestCase() {
|
||||
public abstract class AbstractExtractionTest() : JetLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = LightCodeInsightFixtureTestCase.JAVA_LATEST
|
||||
|
||||
val fixture: JavaCodeInsightTestFixture get() = myFixture
|
||||
@@ -311,7 +311,7 @@ public abstract class AbstractJetExtractionTest() : JetLightCodeInsightFixtureTe
|
||||
val afterFile = File("$path.after")
|
||||
val conflictFile = File("$path.conflicts")
|
||||
|
||||
fixture.setTestDataPath("${JetTestUtils.getHomeDirectory()}/${mainFile.getParent()}")
|
||||
fixture.setTestDataPath("${KotlinTestUtils.getHomeDirectory()}/${mainFile.getParent()}")
|
||||
|
||||
val mainFileName = mainFile.getName()
|
||||
val mainFileBaseName = FileUtil.getNameWithoutExtension(mainFileName)
|
||||
@@ -330,21 +330,21 @@ public abstract class AbstractJetExtractionTest() : JetLightCodeInsightFixtureTe
|
||||
action(file)
|
||||
|
||||
assert(!conflictFile.exists()) { "Conflict file $conflictFile should not exist" }
|
||||
JetTestUtils.assertEqualsToFile(afterFile, file.getText()!!)
|
||||
KotlinTestUtils.assertEqualsToFile(afterFile, file.getText()!!)
|
||||
|
||||
if (checkAdditionalAfterdata) {
|
||||
for ((extraPsiFile, extraFile) in extraFilesToPsi) {
|
||||
JetTestUtils.assertEqualsToFile(File("${extraFile.getPath()}.after"), extraPsiFile.getText())
|
||||
KotlinTestUtils.assertEqualsToFile(File("${extraFile.getPath()}.after"), extraPsiFile.getText())
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e: ConflictsInTestsException) {
|
||||
val message = e.messages.sorted().joinToString(" ").replace("\n", " ")
|
||||
JetTestUtils.assertEqualsToFile(conflictFile, message)
|
||||
KotlinTestUtils.assertEqualsToFile(conflictFile, message)
|
||||
}
|
||||
catch(e: RuntimeException) { // RuntimeException is thrown by IDEA code in CodeInsightUtils.java
|
||||
if (e.javaClass != RuntimeException::class.java) throw e
|
||||
JetTestUtils.assertEqualsToFile(conflictFile, e.message!!)
|
||||
KotlinTestUtils.assertEqualsToFile(conflictFile, e.message!!)
|
||||
}
|
||||
finally {
|
||||
if (addKotlinRuntime) {
|
||||
+3
-3
@@ -54,10 +54,10 @@ import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getNonStrictParentOfType
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import java.io.File
|
||||
|
||||
public abstract class AbstractJetMoveTest : KotlinMultiFileTestCase() {
|
||||
public abstract class AbstractMoveTest : KotlinMultiFileTestCase() {
|
||||
protected fun doTest(path: String) {
|
||||
val config = JsonParser().parse(FileUtil.loadFile(File(path), true)) as JsonObject
|
||||
|
||||
@@ -95,7 +95,7 @@ public abstract class AbstractJetMoveTest : KotlinMultiFileTestCase() {
|
||||
assert(!conflictFile.exists())
|
||||
}
|
||||
catch(e: ConflictsInTestsException) {
|
||||
JetTestUtils.assertEqualsToFile(conflictFile, e.getMessages().sorted().joinToString("\n"))
|
||||
KotlinTestUtils.assertEqualsToFile(conflictFile, e.getMessages().sorted().joinToString("\n"))
|
||||
}
|
||||
finally {
|
||||
PsiDocumentManager.getInstance(getProject()!!).commitAllDocuments()
|
||||
+3
-4
@@ -25,10 +25,9 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import kotlin.test.assertEquals
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
|
||||
public class JetNameSuggesterTest : LightCodeInsightFixtureTestCase() {
|
||||
public class KotlinNameSuggesterTest : LightCodeInsightFixtureTestCase() {
|
||||
public fun testArrayList() { doTest() }
|
||||
|
||||
public fun testGetterSure() { doTest() }
|
||||
@@ -65,7 +64,7 @@ public class JetNameSuggesterTest : LightCodeInsightFixtureTestCase() {
|
||||
private fun doTest() {
|
||||
myFixture.configureByFile(getTestName(false) + ".kt")
|
||||
val file = myFixture.getFile() as KtFile
|
||||
val expectedResultText = JetTestUtils.getLastCommentInFile(file)
|
||||
val expectedResultText = KotlinTestUtils.getLastCommentInFile(file)
|
||||
try {
|
||||
JetRefactoringUtil.selectExpression(myFixture.getEditor(), file, object : JetRefactoringUtil.SelectExpressionCallback {
|
||||
override fun run(expression: KtExpression?) {
|
||||
+8
-8
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.idea.resolve;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -32,42 +32,42 @@ import java.util.regex.Pattern;
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class AdditionalResolveDescriptorRendererTestGenerated extends AbstractAdditionalResolveDescriptorRendererTest {
|
||||
public void testAllFilesPresentInAdditionalLazyResolve() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/additionalLazyResolve"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/additionalLazyResolve"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjectInClassInitializer.kt")
|
||||
public void testAnonymousObjectInClassInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjectInClassParameterInitializer.kt")
|
||||
public void testAnonymousObjectInClassParameterInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassParameterInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassParameterInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localClassInClassInitializer.kt")
|
||||
public void testLocalClassInClassInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localClassInClosureInClassParameterInitializer.kt")
|
||||
public void testLocalClassInClosureInClassParameterInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClosureInClassParameterInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClosureInClassParameterInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localObjectInClassInitializer.kt")
|
||||
public void testLocalObjectInClassInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localObjectInClosureInClassParameterInitializer.kt")
|
||||
public void testLocalObjectInClosureInClassParameterInitializer() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClosureInClassParameterInitializer.kt");
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClosureInClassParameterInitializer.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.JetLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.psi.KtClass;
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration;
|
||||
import org.jetbrains.kotlin.psi.KtFile;
|
||||
@@ -29,11 +29,11 @@ import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JetStubsTest extends LightCodeInsightFixtureTestCase {
|
||||
public class KotlinStubsTest extends LightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return JetLightProjectDescriptor.INSTANCE;
|
||||
return KotlinLightProjectDescriptor.INSTANCE;
|
||||
}
|
||||
|
||||
public void testSuperclassNames() {
|
||||
+3
-3
@@ -25,14 +25,14 @@ import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.idea.util.psi.patternMatching.KotlinPsiUnifier
|
||||
import org.jetbrains.kotlin.idea.util.psi.patternMatching.toRange
|
||||
import java.io.File
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.psi.KtTypeReference
|
||||
import org.jetbrains.kotlin.psi.KtWhenCondition
|
||||
import org.jetbrains.kotlin.idea.test.DirectiveBasedActionUtils
|
||||
import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf
|
||||
|
||||
public abstract class AbstractJetPsiUnifierTest: JetLightCodeInsightFixtureTestCase() {
|
||||
public abstract class AbstractPsiUnifierTest : JetLightCodeInsightFixtureTestCase() {
|
||||
public fun doTest(filePath: String) {
|
||||
fun findPattern(file: KtFile): KtElement {
|
||||
val selectionModel = myFixture.getEditor().getSelectionModel()
|
||||
@@ -56,7 +56,7 @@ public abstract class AbstractJetPsiUnifierTest: JetLightCodeInsightFixtureTestC
|
||||
.match(file, KotlinPsiUnifier.DEFAULT)
|
||||
.map { it.range.getTextRange().substring(file.getText()!!) }
|
||||
.joinToString("\n\n")
|
||||
JetTestUtils.assertEqualsToFile(File("$filePath.match"), actualText)
|
||||
KotlinTestUtils.assertEqualsToFile(File("$filePath.match"), actualText)
|
||||
}
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = getProjectDescriptorFromTestName()
|
||||
+1
-1
@@ -36,7 +36,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractJetSafeDeleteTest extends JetLightCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractSafeDeleteTest extends JetLightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
Reference in New Issue
Block a user