Skip to content

Commit 6cd5561

Browse files
author
Steve Ramage
committed
test: filter INFORMATION highlights from GrammarParseEngineInspectionTest
The value-color annotator adds INFORMATION-severity coloring highlights when the experimental flag is on, which inflates doHighlighting() counts. Count only the inspection problems (severity != INFORMATION), matching the value-coloring annotator.
1 parent 275c02e commit 6cd5561

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/test/kotlin/net/sjrx/intellij/plugins/systemdunitfiles/inspections/GrammarParseEngineInspectionTest.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.sjrx.intellij.plugins.systemdunitfiles.inspections
22

3+
import com.intellij.lang.annotation.HighlightSeverity
34
import net.sjrx.intellij.plugins.systemdunitfiles.AbstractUnitFileTest
45
import net.sjrx.intellij.plugins.systemdunitfiles.settings.ExperimentalSettings
56
import org.junit.Test
@@ -42,7 +43,7 @@ class GrammarParseEngineInspectionTest : AbstractUnitFileTest() {
4243
setupFileInEditor("file.service", file)
4344
enableInspection(InvalidValueInspection::class.java)
4445

45-
assertSize(0, myFixture.doHighlighting())
46+
assertSize(0, myFixture.doHighlighting().filter { it.severity != HighlightSeverity.INFORMATION })
4647
}
4748

4849
@Test
@@ -62,7 +63,7 @@ class GrammarParseEngineInspectionTest : AbstractUnitFileTest() {
6263
setupFileInEditor("file.service", file)
6364
enableInspection(InvalidValueInspection::class.java)
6465

65-
assertSize(3, myFixture.doHighlighting())
66+
assertSize(3, myFixture.doHighlighting().filter { it.severity != HighlightSeverity.INFORMATION })
6667
}
6768

6869
@Test
@@ -77,6 +78,6 @@ class GrammarParseEngineInspectionTest : AbstractUnitFileTest() {
7778
setupFileInEditor("file.service", file)
7879
enableInspection(InvalidValueInspection::class.java)
7980

80-
assertSize(0, myFixture.doHighlighting())
81+
assertSize(0, myFixture.doHighlighting().filter { it.severity != HighlightSeverity.INFORMATION })
8182
}
8283
}

0 commit comments

Comments
 (0)