Update configuration to run tests in TC

Merge-request: IJ-MR-169550
Merged-by: Ilia Permiashkin <ilia.permiashkin@jetbrains.com>

GitOrigin-RevId: 894a3cf2f2507f55fdfdd4a69a9cf9acd9928ccb
This commit is contained in:
Ilia Permiashkin
2025-07-23 12:47:36 +00:00
committed by intellij-monorepo-bot
parent f084f0eaf1
commit bfa22aa081
6 changed files with 22 additions and 14 deletions
+2
View File
@@ -265,6 +265,8 @@ jvm_library(
visibility = ["//visibility:public"],
srcs = glob([], allow_empty = True),
deps = [
"//spellchecker",
"//spellchecker:spellchecker_test_lib",
"//java/java-tests:tests_test_lib",
"//plugins/junit/java-tests:java-tests_test_lib",
"//jvm/jvm-analysis-java-tests:analysis-java-tests_test_lib",
+1
View File
@@ -49,6 +49,7 @@
<orderEntry type="module" module-name="intellij.java.resources" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.java.resources.en" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.spellchecker" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.spellchecker" scope="TEST" />
<orderEntry type="module" module-name="intellij.jsp.base" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.java.testFramework" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.platform.testRunner" scope="RUNTIME" />
+4
View File
@@ -45,6 +45,7 @@ jvm_library(
"//platform/vcs-api:vcs",
"//platform/vcs-impl",
"//platform/util/jdom",
"@lib//:kotlin-stdlib",
"@lib//:kotlinx-coroutines-core",
"@lib//:caffeine",
],
@@ -85,6 +86,9 @@ jvm_library(
"//platform/vcs-impl",
"//platform/vcs-impl:vcs-impl_test_lib",
"//platform/util/jdom",
"@lib//:kotlin-stdlib",
"@lib//:kotlin-test",
"@lib//:kotlin-test-junit",
"@lib//:kotlinx-coroutines-core",
"@lib//:caffeine",
"//tools/intellij.tools.ide.metrics.benchmark:ide-metrics-benchmark",
+3
View File
@@ -51,6 +51,9 @@
<orderEntry type="module" module-name="intellij.platform.vcs" />
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
<orderEntry type="module" module-name="intellij.platform.util.jdom" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" scope="TEST" name="kotlin-test" level="project" />
<orderEntry type="library" scope="TEST" name="kotlin-test-junit" level="project" />
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
<orderEntry type="library" name="caffeine" level="project" />
<orderEntry type="module" module-name="intellij.tools.ide.metrics.benchmark" scope="TEST" />
@@ -1,2 +0,0 @@
[SPELLCHECKER_TESTS]
com.intellij.spellchecker.*
@@ -4,8 +4,8 @@ package com.intellij.spellchecker.dataset
import com.intellij.spellchecker.SpellCheckerManager
import com.intellij.spellchecker.dataset.Datasets.WordWithMisspellings
import com.intellij.spellchecker.inspection.SpellcheckerInspectionTestCase
import org.junit.Assert.assertTrue
import org.junit.jupiter.api.assertAll
import kotlin.test.assertFalse
import kotlin.test.assertTrue
private const val MAX_WORD_LENGTH = 32
@@ -21,19 +21,19 @@ class DataSetQualityTest : SpellcheckerInspectionTestCase() {
private fun doSpellcheckingTest(dataset: List<WordWithMisspellings>) {
val manager = SpellCheckerManager.getInstance(project)
assertAll(*dataset.flatMap { word ->
mutableListOf(
{ assertFalse("${word.word} should not be misspelled, but it is", manager.hasProblem(word.word)) },
{ assertLessThanOrEqualMaxWordLength("${word.word} exceeds max word length $MAX_WORD_LENGTH", word.word.length) }
) +
word.misspellings.map { misspelling ->
{ assertTrue("$misspelling should be misspelled, but it is", manager.hasProblem(misspelling)) }
{ assertLessThanOrEqualMaxWordLength("$misspelling exceeds max word length $MAX_WORD_LENGTH", misspelling.length) }
dataset.forEach { word ->
assertFalse(manager.hasProblem(word.word), "${word.word} should not be misspelled, but it is")
assertLessThanOrEqualMaxWordLength("${word.word} exceeds max word length $MAX_WORD_LENGTH", word.word.length)
word.misspellings.forEach { misspelling ->
assertTrue(manager.hasProblem(misspelling), "$misspelling should be misspelled, but it is")
assertLessThanOrEqualMaxWordLength("$misspelling exceeds max word length $MAX_WORD_LENGTH", misspelling.length)
}
}.toTypedArray())
}
}
}
private fun assertLessThanOrEqualMaxWordLength(message: String, actual: Int) {
assertTrue(message, actual <= MAX_WORD_LENGTH)
assertTrue(actual <= MAX_WORD_LENGTH, message)
}