@@ -9,7 +9,7 @@ import org.hamcrest.Matchers.*
9
9
import org.junit.Assert.assertThat
10
10
import org.junit.Test
11
11
12
- class DiagnosticTest : SingleFileTestFixture (" diagnostic" , " DiagnosticErrors .kt" ) {
12
+ class DiagnosticTest : SingleFileTestFixture (" diagnostic" , " Diagnostics .kt" ) {
13
13
@Test fun `report error on open` () {
14
14
languageServer.textDocumentService.debounceLint.waitForPendingTask()
15
15
@@ -21,7 +21,7 @@ class DiagnosticTest : SingleFileTestFixture("diagnostic", "DiagnosticErrors.kt"
21
21
for (i in 1 .. 10 ) {
22
22
val newText = text + " 1"
23
23
24
- replace(file, 3 , 16 , text, newText)
24
+ replace(file, 7 , 16 , text, newText)
25
25
text = newText
26
26
}
27
27
@@ -37,11 +37,12 @@ class DiagnosticTest : SingleFileTestFixture("diagnostic", "DiagnosticErrors.kt"
37
37
languageServer.textDocumentService.lintRecompilationCallback = {
38
38
if (callbackCount++ == 0 ) {
39
39
diagnostics.clear()
40
- replace(file, 3 , 9 , " return 11" , " " )
40
+ replace(file, 7 , 9 , " return 11" , " " )
41
41
languageServer.textDocumentService.documentSymbol(DocumentSymbolParams (TextDocumentIdentifier (uri(file).toString()))).get()
42
42
}
43
43
}
44
- replace(file, 3 , 16 , " " , " 1" )
44
+ replace(file, 6 , 9 , " Foo()" , " " )
45
+ replace(file, 7 , 16 , " " , " 1" )
45
46
46
47
while (callbackCount < 2 ) {
47
48
try {
0 commit comments