mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove remaining parts of "all files present" checking
GitOrigin-RevId: 280ae5dabed1d52d9137d63ba3e58dffdd071255
This commit is contained in:
committed by
intellij-monorepo-bot
parent
868e68b708
commit
02cffbd146
-1
@@ -32,7 +32,6 @@ abstract class AbstractFirLazyResolveTest : KotlinLightCodeInsightFixtureTestCas
|
||||
override fun isFirPlugin(): Boolean = true
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.getProjectDescriptor()
|
||||
val testFile = File(testDataPath, fileName())
|
||||
val config = JsonParser().parse(FileUtil.loadFile(testFile, true)) as JsonObject
|
||||
val withRuntime = config["withRuntime"]?.asBoolean ?: false
|
||||
|
||||
+8
-9
@@ -70,15 +70,14 @@ abstract class AbstractGradleConfigureProjectByChangingFileTest :
|
||||
}
|
||||
|
||||
override fun getProjectJDK(): Sdk {
|
||||
if (!isAllFilesPresentTest(getTestName(false))) {
|
||||
val beforeAfterFiles = beforeAfterFiles()
|
||||
val (before, _) = beforeAfterFiles
|
||||
val gradleFile = File(testDataPath, before)
|
||||
if (gradleFile.readText().contains("1.9")) {
|
||||
return PluginTestCaseBase.mockJdk9()
|
||||
}
|
||||
}
|
||||
val beforeAfterFiles = beforeAfterFiles()
|
||||
val (before, _) = beforeAfterFiles
|
||||
val gradleFile = File(testDataPath, before)
|
||||
|
||||
return super.getProjectJDK()
|
||||
if (gradleFile.readText().contains("1.9")) {
|
||||
return PluginTestCaseBase.mockJdk9()
|
||||
} else {
|
||||
return super.getProjectJDK()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -97,7 +97,6 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase(
|
||||
super.setUp()
|
||||
|
||||
val testName = getTestName(false)
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(testName)) return
|
||||
|
||||
val testDataDir = TestMetadataUtil.getTestData(this::class.java)
|
||||
val testFile = listOf(File(testDataDir, "$testName.kt"), File(testDataDir, "$testName.kts")).first { it.exists() }
|
||||
|
||||
-1
@@ -26,7 +26,6 @@ import java.io.File
|
||||
|
||||
abstract class AbstractMultiFileLocalInspectionTest : AbstractLocalInspectionTest() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.getProjectDescriptor()
|
||||
val testFile = File(testDataPath, fileName())
|
||||
val config = JsonParser().parse(FileUtil.loadFile(testFile, true)) as JsonObject
|
||||
val withRuntime = config["withRuntime"]?.asBoolean ?: false
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ import java.io.File
|
||||
|
||||
abstract class AbstractMultiFileIntentionTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.getProjectDescriptor()
|
||||
val testFile = File(testDataPath, fileName())
|
||||
val config = JsonParser().parse(FileUtil.loadFile(testFile, true)) as JsonObject
|
||||
val withRuntime = config["withRuntime"]?.asBoolean ?: false
|
||||
|
||||
-2
@@ -38,8 +38,6 @@ abstract class AbstractMultifileRefactoringTest : KotlinLightCodeInsightFixtureT
|
||||
}
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.getProjectDescriptor()
|
||||
|
||||
val testConfigurationFile = File(super.getTestDataPath(), fileName())
|
||||
val config = loadTestConfiguration(testConfigurationFile)
|
||||
val withRuntime = config["withRuntime"]?.asBoolean ?: false
|
||||
|
||||
-2
@@ -82,8 +82,6 @@ abstract class AbstractRenameTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
)
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.getProjectDescriptor()
|
||||
|
||||
val testConfigurationFile = File(testDataPath, fileName())
|
||||
val renameObject = loadTestConfiguration(testConfigurationFile)
|
||||
val withRuntime = renameObject.getNullableString("withRuntime")
|
||||
|
||||
+1
-2
@@ -55,6 +55,5 @@ abstract class AbstractNewJavaToKotlinConverterSingleFileTest : AbstractJavaToKo
|
||||
File(javaPath.replace(".java", ".new.kt")).takeIf { it.exists() }
|
||||
?: super.provideExpectedFile(javaPath)
|
||||
|
||||
override fun getProjectDescriptor() =
|
||||
descriptorByFileDirective(File(testDataPath, fileName()), isAllFilesPresentInTest())
|
||||
override fun getProjectDescriptor() = descriptorByFileDirective(File(testDataPath, fileName()))
|
||||
}
|
||||
|
||||
+1
-2
@@ -77,6 +77,5 @@ abstract class AbstractMutabilityInferenceTest : AbstractConstraintCollectorTest
|
||||
deleteComments()
|
||||
}
|
||||
|
||||
override fun getProjectDescriptor() =
|
||||
descriptorByFileDirective(File(testDataPath, fileName()), isAllFilesPresentInTest())
|
||||
override fun getProjectDescriptor() = descriptorByFileDirective(File(testDataPath, fileName()))
|
||||
}
|
||||
+1
-2
@@ -70,6 +70,5 @@ abstract class AbstractNullabilityInferenceTest : AbstractConstraintCollectorTes
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
override fun getProjectDescriptor() =
|
||||
descriptorByFileDirective(File(testDataPath, fileName()), isAllFilesPresentInTest())
|
||||
override fun getProjectDescriptor() = descriptorByFileDirective(File(testDataPath, fileName()))
|
||||
}
|
||||
@@ -19,10 +19,9 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import java.io.File
|
||||
|
||||
fun descriptorByFileDirective(testDataFile: File, isAllFilesPresentInTest: Boolean) =
|
||||
object : KotlinWithJdkAndRuntimeLightProjectDescriptor() {
|
||||
fun descriptorByFileDirective(testDataFile: File): KotlinWithJdkAndRuntimeLightProjectDescriptor {
|
||||
return object : KotlinWithJdkAndRuntimeLightProjectDescriptor() {
|
||||
private fun projectDescriptorByFileDirective(): LightProjectDescriptor {
|
||||
if (isAllFilesPresentInTest) return INSTANCE
|
||||
val fileText = FileUtil.loadFile(testDataFile, true)
|
||||
return if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME_WITH_FULL_JDK"))
|
||||
INSTANCE_FULL_JDK
|
||||
@@ -44,4 +43,5 @@ fun descriptorByFileDirective(testDataFile: File, isAllFilesPresentInTest: Boole
|
||||
model.getModuleExtension(LanguageLevelModuleExtension::class.java).languageLevel = LanguageLevel.JDK_1_8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-4
@@ -223,10 +223,6 @@ abstract class KotlinDescriptorTestCase : DescriptorTestCase() {
|
||||
}
|
||||
|
||||
override fun checkTestOutput() {
|
||||
if (isAllFilesPresentTest(getTestName(false))) {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
super.checkTestOutput()
|
||||
} catch (e: ComparisonFailure) {
|
||||
|
||||
+8
-10
@@ -25,7 +25,6 @@ import org.jetbrains.kotlin.idea.configuration.AbstractConfigureProjectByChangin
|
||||
import org.jetbrains.kotlin.idea.configuration.NotificationMessageCollector
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils.isAllFilesPresentTest
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractMavenConfigureProjectByChangingFileTest : AbstractConfigureProjectByChangingFileTest<KotlinMavenConfigurator>() {
|
||||
@@ -52,16 +51,15 @@ abstract class AbstractMavenConfigureProjectByChangingFileTest : AbstractConfigu
|
||||
}
|
||||
|
||||
override fun getProjectJDK(): Sdk {
|
||||
if (!isAllFilesPresentTest(getTestName(false))) {
|
||||
val root = KotlinTestUtils.getTestsRoot(this::class.java)
|
||||
val dir = KotlinTestUtils.getTestDataFileName(this::class.java, name)
|
||||
val root = KotlinTestUtils.getTestsRoot(this::class.java)
|
||||
val dir = KotlinTestUtils.getTestDataFileName(this::class.java, name)
|
||||
|
||||
val pomFile = File("$root/$dir", MavenConstants.POM_XML)
|
||||
if (pomFile.readText().contains("<target>9</target>")) {
|
||||
return PluginTestCaseBase.mockJdk9()
|
||||
}
|
||||
val pomFile = File("$root/$dir", MavenConstants.POM_XML)
|
||||
|
||||
if (pomFile.readText().contains("<target>9</target>")) {
|
||||
return PluginTestCaseBase.mockJdk9()
|
||||
} else {
|
||||
return super.getProjectJDK()
|
||||
}
|
||||
|
||||
return super.getProjectJDK()
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -161,10 +161,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
}
|
||||
|
||||
private fun getProjectDescriptorFromFileDirective(): LightProjectDescriptor {
|
||||
if (isAllFilesPresentInTest()) {
|
||||
return KotlinLightProjectDescriptor.INSTANCE
|
||||
}
|
||||
|
||||
val file = File(testDataPath, fileName())
|
||||
if (!file.exists()) {
|
||||
return KotlinLightProjectDescriptor.INSTANCE
|
||||
@@ -218,8 +214,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
|
||||
protected open fun getDefaultProjectDescriptor(): KotlinLightProjectDescriptor = KotlinLightProjectDescriptor.INSTANCE
|
||||
|
||||
protected fun isAllFilesPresentInTest(): Boolean = KotlinTestUtils.isAllFilesPresentTest(getTestName(false))
|
||||
|
||||
protected fun performNotWriteEditorAction(actionId: String): Boolean {
|
||||
val dataContext = (myFixture.editor as EditorEx).dataContext
|
||||
|
||||
|
||||
-4
@@ -121,10 +121,6 @@ public class PluginTestCaseBase {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isAllFilesPresentTest(@NotNull String testName) {
|
||||
return StringUtil.startsWithIgnoreCase(testName, "allFilesPresentIn");
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public static void clearSdkTable(@NotNull Disposable disposable) {
|
||||
Disposer.register(disposable, () -> ApplicationManager.getApplication().runWriteAction(() -> {
|
||||
|
||||
@@ -11,7 +11,10 @@ import com.intellij.openapi.editor.Caret;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.util.text.StringUtilRt;
|
||||
@@ -27,29 +30,21 @@ import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import junit.framework.TestCase;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.analyzer.AnalysisResult;
|
||||
import org.jetbrains.kotlin.builtins.DefaultBuiltIns;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.checkers.CompilerTestLanguageVersionSettings;
|
||||
import org.jetbrains.kotlin.checkers.CompilerTestLanguageVersionSettingsKt;
|
||||
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys;
|
||||
import org.jetbrains.kotlin.cli.common.config.ContentRootsKt;
|
||||
import org.jetbrains.kotlin.cli.common.config.KotlinSourceRoot;
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation;
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity;
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation;
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt;
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
|
||||
import org.jetbrains.kotlin.config.*;
|
||||
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl;
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage;
|
||||
@@ -57,8 +52,6 @@ import org.jetbrains.kotlin.idea.artifacts.KotlinArtifacts;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.psi.KtFile;
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactoryKt;
|
||||
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
|
||||
import org.jetbrains.kotlin.storage.LockBasedStorageManager;
|
||||
import org.jetbrains.kotlin.test.util.JetTestUtilsKt;
|
||||
import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
|
||||
@@ -69,7 +62,6 @@ import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
@@ -79,13 +71,12 @@ import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static org.jetbrains.kotlin.test.InTextDirectivesUtils.*;
|
||||
import static org.jetbrains.kotlin.test.InTextDirectivesUtils.IGNORE_BACKEND_DIRECTIVE_PREFIX;
|
||||
import static org.jetbrains.kotlin.test.InTextDirectivesUtils.isIgnoredTarget;
|
||||
|
||||
public class KotlinTestUtils {
|
||||
public static final String TEST_MODULE_NAME = "test-module";
|
||||
|
||||
private static final String PLEASE_REGENERATE_TESTS = "Please regenerate tests (GenerateTests.kt)";
|
||||
|
||||
private static final boolean RUN_IGNORED_TESTS_AS_REGULAR =
|
||||
Boolean.getBoolean("org.jetbrains.kotlin.run.ignored.tests.as.regular");
|
||||
|
||||
@@ -758,145 +749,12 @@ public class KotlinTestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllTestsPresentByMetadataWithExcluded(
|
||||
@NotNull Class<?> testCaseClass,
|
||||
@NotNull File testDataDir,
|
||||
@NotNull Pattern filenamePattern,
|
||||
@Nullable Pattern excludedPattern,
|
||||
boolean recursive,
|
||||
@NotNull String... excludeDirs
|
||||
) {
|
||||
assertAllTestsPresentByMetadataWithExcluded(testCaseClass, testDataDir, filenamePattern, excludedPattern, TargetBackend.ANY, recursive, excludeDirs);
|
||||
}
|
||||
|
||||
public static void assertAllTestsPresentByMetadataWithExcluded(
|
||||
@NotNull Class<?> testCaseClass,
|
||||
@NotNull File testDataDir,
|
||||
@NotNull Pattern filenamePattern,
|
||||
@Nullable Pattern excludedPattern,
|
||||
@NotNull TargetBackend targetBackend,
|
||||
boolean recursive,
|
||||
@NotNull String... excludeDirs
|
||||
) {
|
||||
File rootFile = new File(getTestsRoot(testCaseClass));
|
||||
|
||||
Set<String> filePaths = collectPathsMetadata(testCaseClass);
|
||||
Set<String> exclude = SetsKt.setOf(excludeDirs);
|
||||
|
||||
File[] files = testDataDir.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
if (recursive && containsTestData(file, filenamePattern, excludedPattern) && !exclude.contains(file.getName())) {
|
||||
assertTestClassPresentByMetadata(testCaseClass, file);
|
||||
}
|
||||
}
|
||||
else {
|
||||
boolean excluded = excludedPattern != null && excludedPattern.matcher(file.getName()).matches();
|
||||
if (!excluded && filenamePattern.matcher(file.getName()).matches() && isCompatibleTarget(targetBackend, file)) {
|
||||
assertFilePathPresent(file, rootFile, filePaths);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllTestsPresentInSingleGeneratedClass(
|
||||
@NotNull Class<?> testCaseClass,
|
||||
@NotNull File testDataDir,
|
||||
@NotNull Pattern filenamePattern,
|
||||
@NotNull TargetBackend targetBackend
|
||||
) {
|
||||
assertAllTestsPresentInSingleGeneratedClass(testCaseClass, testDataDir, filenamePattern, null, targetBackend);
|
||||
}
|
||||
|
||||
public static void assertAllTestsPresentInSingleGeneratedClass(
|
||||
@NotNull Class<?> testCaseClass,
|
||||
@NotNull File testDataDir,
|
||||
@NotNull Pattern filenamePattern,
|
||||
@Nullable Pattern excludePattern,
|
||||
@NotNull TargetBackend targetBackend
|
||||
) {
|
||||
File rootFile = new File(getTestsRoot(testCaseClass));
|
||||
|
||||
Set<String> filePaths = collectPathsMetadata(testCaseClass);
|
||||
|
||||
FileUtil.processFilesRecursively(testDataDir, file -> {
|
||||
boolean excluded = excludePattern != null && excludePattern.matcher(file.getName()).matches();
|
||||
if (file.isFile() && !excluded && filenamePattern.matcher(file.getName()).matches() && isCompatibleTarget(targetBackend, file)) {
|
||||
assertFilePathPresent(file, rootFile, filePaths);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private static void assertFilePathPresent(File file, File rootFile, Set<String> filePaths) {
|
||||
String path = FileUtil.getRelativePath(rootFile, file);
|
||||
if (path != null) {
|
||||
String relativePath = nameToCompare(path);
|
||||
if (!filePaths.contains(relativePath)) {
|
||||
Assert.fail("Test data file missing from the generated test class: " + file + "\n" + PLEASE_REGENERATE_TESTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<String> collectPathsMetadata(Class<?> testCaseClass) {
|
||||
return ContainerUtil.newHashSet(ContainerUtil.map(collectMethodsMetadata(testCaseClass), KotlinTestUtils::nameToCompare));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String getMethodMetadata(Method method) {
|
||||
TestMetadata testMetadata = method.getAnnotation(TestMetadata.class);
|
||||
return (testMetadata != null) ? testMetadata.value() : null;
|
||||
}
|
||||
|
||||
private static Set<String> collectMethodsMetadata(Class<?> testCaseClass) {
|
||||
Set<String> filePaths = new HashSet<>();
|
||||
for (Method method : testCaseClass.getDeclaredMethods()) {
|
||||
String path = getMethodMetadata(method);
|
||||
if (path != null) {
|
||||
filePaths.add(path);
|
||||
}
|
||||
}
|
||||
return filePaths;
|
||||
}
|
||||
|
||||
private static boolean containsTestData(File dir, Pattern filenamePattern, @Nullable Pattern excludedPattern) {
|
||||
File[] files = dir.listFiles();
|
||||
assert files != null;
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
if (containsTestData(file, filenamePattern, excludedPattern)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
boolean excluded = excludedPattern != null && excludedPattern.matcher(file.getName()).matches();
|
||||
if (! excluded && filenamePattern.matcher(file.getName()).matches()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void assertTestClassPresentByMetadata(@NotNull Class<?> outerClass, @NotNull File testDataDir) {
|
||||
for (Class<?> nestedClass : outerClass.getDeclaredClasses()) {
|
||||
TestMetadata testMetadata = nestedClass.getAnnotation(TestMetadata.class);
|
||||
if (testMetadata != null && testMetadata.value().equals(getFilePath(testDataDir))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Assert.fail("Test data directory missing from the generated test class: " + testDataDir + "\n" + PLEASE_REGENERATE_TESTS);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static KtFile loadJetFile(@NotNull Project project, @NotNull File ioFile) throws IOException {
|
||||
String text = FileUtil.loadFile(ioFile, true);
|
||||
return KtPsiFactoryKt.KtPsiFactory(project).createPhysicalFile(ioFile.getName(), text);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ModuleDescriptorImpl createEmptyModule() {
|
||||
return createEmptyModule("<empty-for-test>");
|
||||
@@ -917,15 +775,6 @@ public class KotlinTestUtils {
|
||||
return new File(file.getParentFile(), FileUtil.getNameWithoutExtension(file) + (newExtension == null ? "" : "." + newExtension));
|
||||
}
|
||||
|
||||
public static boolean isAllFilesPresentTest(String testName) {
|
||||
//noinspection SpellCheckingInspection
|
||||
return testName.toLowerCase().startsWith("allfilespresentin");
|
||||
}
|
||||
|
||||
public static String nameToCompare(@NotNull String name) {
|
||||
return (SystemInfo.isFileSystemCaseSensitive ? name : name.toLowerCase()).replace('\\', '/');
|
||||
}
|
||||
|
||||
public static boolean isMultiExtensionName(@NotNull String name) {
|
||||
int firstDotIndex = name.indexOf('.');
|
||||
if (firstDotIndex == -1) {
|
||||
|
||||
Reference in New Issue
Block a user