Use abstract class to prevent GradleDaemonAnalyzerTestCase running as test
This commit is contained in:
+10
-3
@@ -40,7 +40,11 @@ class GradleMultiplatformHighlightingTest : GradleImportingTestCase() {
|
|||||||
val files = importProjectFromTestData()
|
val files = importProjectFromTestData()
|
||||||
val project = myTestFixture.project
|
val project = myTestFixture.project
|
||||||
|
|
||||||
checkFiles(files, project, GradleDaemonAnalyzerTestCase(testLineMarkers = true, checkWarnings = true, checkInfos = false)) { file ->
|
checkFiles(
|
||||||
|
files,
|
||||||
|
project,
|
||||||
|
object : GradleDaemonAnalyzerTestCase(testLineMarkers = true, checkWarnings = true, checkInfos = false) {}
|
||||||
|
) { file ->
|
||||||
file.extension == "kt"
|
file.extension == "kt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,8 +54,11 @@ class GradleMultiplatformHighlightingTest : GradleImportingTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GradleDaemonAnalyzerTestCase(val testLineMarkers: Boolean, val checkWarnings: Boolean, val checkInfos: Boolean) :
|
abstract class GradleDaemonAnalyzerTestCase(
|
||||||
DaemonAnalyzerTestCase() {
|
val testLineMarkers: Boolean,
|
||||||
|
val checkWarnings: Boolean,
|
||||||
|
val checkInfos: Boolean
|
||||||
|
) : DaemonAnalyzerTestCase() {
|
||||||
override fun doTestLineMarkers() = testLineMarkers
|
override fun doTestLineMarkers() = testLineMarkers
|
||||||
|
|
||||||
fun checkHighlighting(project: Project, editor: Editor) {
|
fun checkHighlighting(project: Project, editor: Editor) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
package org.jetbrains.kotlin.gradle
|
package org.jetbrains.kotlin.gradle
|
||||||
|
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||||
import org.junit.Test
|
|
||||||
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
|
||||||
class ImportAndCheckHighlighting : MultiplePluginVersionGradleImportingTestCase() {
|
class ImportAndCheckHighlighting : MultiplePluginVersionGradleImportingTestCase() {
|
||||||
@@ -28,7 +28,15 @@ class ImportAndCheckHighlighting : MultiplePluginVersionGradleImportingTestCase(
|
|||||||
val files = configureByFiles()
|
val files = configureByFiles()
|
||||||
importProject()
|
importProject()
|
||||||
val project = myTestFixture.project
|
val project = myTestFixture.project
|
||||||
checkFiles(files, project, GradleDaemonAnalyzerTestCase(testLineMarkers = testLineMarkers, checkWarnings = checkWarnings, checkInfos = false)) { file ->
|
checkFiles(
|
||||||
|
files,
|
||||||
|
project,
|
||||||
|
object : GradleDaemonAnalyzerTestCase(
|
||||||
|
testLineMarkers = testLineMarkers,
|
||||||
|
checkWarnings = checkWarnings,
|
||||||
|
checkInfos = false
|
||||||
|
) {}
|
||||||
|
) { file ->
|
||||||
file.extension == "kt" || file.extension == "java"
|
file.extension == "kt" || file.extension == "java"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-3
@@ -18,10 +18,7 @@ import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
|||||||
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
import org.jetbrains.kotlin.idea.debugger.test.preference.DebuggerPreferences
|
||||||
|
|
||||||
abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping() {
|
abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping() {
|
||||||
|
|
||||||
|
|
||||||
override fun doMultiFileTest(files: TestFiles, preferences: DebuggerPreferences) {
|
override fun doMultiFileTest(files: TestFiles, preferences: DebuggerPreferences) {
|
||||||
|
|
||||||
doOnBreakpoint {
|
doOnBreakpoint {
|
||||||
val evalContext = EvaluationContextImpl(this, frameProxy)
|
val evalContext = EvaluationContextImpl(this, frameProxy)
|
||||||
val execContext = ExecutionContext(evalContext, frameProxy ?: return@doOnBreakpoint)
|
val execContext = ExecutionContext(evalContext, frameProxy ?: return@doOnBreakpoint)
|
||||||
|
|||||||
Reference in New Issue
Block a user