mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tests: simplify IdentifierHighlighterPassFactory.doWithHighlightingEnabled to remove confusion
GitOrigin-RevId: 5f135498ddc65297c82733ee6387bac29aa43c26
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c08bdb7b0c
commit
8427ef6490
+4
-4
@@ -174,7 +174,7 @@ class IdeaDecompilerTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testHighlighting() {
|
||||
myFixture.setReadEditorMarkupModel(true)
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, testRootDisposable, Runnable {
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, Runnable {
|
||||
myFixture.openFileInEditor(getTestFile("Navigation.class"))
|
||||
myFixture.editor.caretModel.moveToOffset(offset(8, 14)) // m2(): usage, declaration
|
||||
assertEquals(2, highlightUnderCaret().size)
|
||||
@@ -196,7 +196,7 @@ class IdeaDecompilerTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
fun testNameHighlightingInsideCompiledFile() {
|
||||
myFixture.setReadEditorMarkupModel(true)
|
||||
myFixture.openFileInEditor(getTestFile("NamesHighlightingInsideCompiledFile.class"))
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, testRootDisposable, Runnable {
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, Runnable {
|
||||
val infos = myFixture.doHighlighting()
|
||||
assertTrue(infos.toString(), infos.all { info: HighlightInfo -> info.severity === HighlightInfoType.SYMBOL_TYPE_SEVERITY })
|
||||
assertEquals(68, infos.size)
|
||||
@@ -206,7 +206,7 @@ class IdeaDecompilerTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
fun testNameHighlightingInsideCompiledModuleFile() {
|
||||
myFixture.setReadEditorMarkupModel(true)
|
||||
myFixture.openFileInEditor(getTestFile("module-info.class"))
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, testRootDisposable, Runnable {
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, Runnable {
|
||||
val infos = myFixture.doHighlighting()
|
||||
.filter { it.severity === HighlightInfoType.SYMBOL_TYPE_SEVERITY }
|
||||
assertEquals(5, infos.size)
|
||||
@@ -225,7 +225,7 @@ class IdeaDecompilerTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
val testFile = getTestFile("RecordHighlighting.class")
|
||||
testFile.parent.children; testFile.parent.refresh(false, true) // inner classes
|
||||
myFixture.openFileInEditor(testFile)
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, testRootDisposable, Runnable {
|
||||
IdentifierHighlighterPassFactory.doWithHighlightingEnabled(project, Runnable {
|
||||
val infos = myFixture.doHighlighting()
|
||||
.filter { it.severity === HighlightInfoType.SYMBOL_TYPE_SEVERITY }
|
||||
val texts = infos.map { it.text }.toSet()
|
||||
|
||||
Reference in New Issue
Block a user