Merge together MultiplatformHighlighting and MultiplatformAnalysis tests

Basically, the former uses an old quickly-scrapped infrastructure,
which were not applicable for HMPP, so  the latter tests were written.

So, both check for one and the same thing (highlighting in MPP projects),
but MultiplatformAnalysisTest is more modern,
and has a lot of inconvenient stuff in MultiplatformHighlighting fixed
^KT-43116 Fixed
This commit is contained in:
Alexander Dudinsky
2020-12-22 12:29:43 +03:00
parent 73576c80e4
commit 10a5727260
123 changed files with 293 additions and 443 deletions
@@ -1,47 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.gradle
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
import org.jetbrains.kotlin.idea.codeInsight.gradle.mppImportTestMinVersionForMaster
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
import org.junit.Test
class ImportAndCheckHighlighting : MultiplePluginVersionGradleImportingTestCase() {
@Test
@PluginTargetVersions(pluginVersion = "1.3.40+", gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
fun testMultiplatformLibrary() {
importAndCheckHighlighting()
}
@Test
@PluginTargetVersions(pluginVersion = "1.3.40+", gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
fun testUnresolvedInMultiplatformLibrary() {
importAndCheckHighlighting(false, false)
}
private fun importAndCheckHighlighting(testLineMarkers: Boolean = true, checkWarnings: Boolean = true) {
val files = configureByFiles()
importProject(skipIndexing = false)
val project = myTestFixture.project
checkFiles(
files.filter { it.extension == "kt" || it.extension == "java" },
project,
object : GradleDaemonAnalyzerTestCase(
testLineMarkers = testLineMarkers,
checkWarnings = checkWarnings,
checkInfos = false,
rootDisposable = testRootDisposable
) {}
)
}
override fun testDataDirName(): String {
return "importAndCheckHighlighting"
}
}