File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
idea/tests/org/jetbrains/kotlin/idea/codeInsight Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 22
22
import com .intellij .openapi .editor .Document ;
23
23
import com .intellij .openapi .project .Project ;
24
24
import com .intellij .openapi .util .Condition ;
25
+ import com .intellij .openapi .util .io .FileUtil ;
25
26
import com .intellij .psi .NavigatablePsiElement ;
26
27
import com .intellij .psi .PsiDocumentManager ;
27
28
import com .intellij .psi .PsiElement ;
@@ -80,6 +81,12 @@ public void doTest(String path) {
80
81
81
82
try {
82
83
data .checkLineMarkers (markers , document .getText ());
84
+
85
+ // This is a workaround for sad bug in ExpectedHighlightingData:
86
+ // the latter doesn't throw assertion error when some line markers are expected, but none are present.
87
+ if (FileUtil .loadFile (new File (path )).contains ("<lineMarker" ) && markers .isEmpty ()) {
88
+ throw new AssertionError ("Some line markers are expected, but nothing is present at all" );
89
+ }
83
90
}
84
91
catch (AssertionError error ) {
85
92
try {
You can’t perform that action at this time.
0 commit comments