Skip to content
Snippets Groups Projects
Commit 29c1ffbb authored by sebastian's avatar sebastian
Browse files

fixed windows related bugs

parent fcd2cc48
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,7 @@ class BDocumentServiceTest {
val documentService = BDocumentService(DummyServer(), communicator, ProBKernelManager(communicator))
val expectedDocument = File("b-language-server/src/test/resources/WD_M1.mch").absolutePath
documentService.checkDocument(URI("src/test/resources/WD_M1.mch"))
......@@ -124,7 +125,7 @@ class BDocumentServiceTest {
assertEquals(1, communicator.pushedDiagnostics.entries.size)
assertEquals(3, communicator.pushedDiagnostics.entries.first().value.size)
assertTrue(targetSet.first().contains("b-language-server/src/test/resources/WD_M1.mch"))
assertEquals(expectedDocument, targetSet.first())
}
......
......@@ -8,6 +8,7 @@ import org.eclipse.lsp4j.DiagnosticSeverity
import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.Range
import org.junit.jupiter.api.Test
import java.io.File
import kotlin.test.assertEquals
class UtilTest {
......@@ -21,16 +22,16 @@ class UtilTest {
val endLine = 101
val endCol = 101
val message = "hello"
val file = "/test"
val file = File("/test")
val errorItem = ErrorItem(message, ErrorItem.Type.INTERNAL_ERROR,
listOf(ErrorItem.Location(file, startLine,statCol,endLine,endCol)))
listOf(ErrorItem.Location(file.absolutePath, startLine,statCol,endLine,endCol)))
val diagnostic = Diagnostic(
Range(
Position(startLine-1, statCol),
Position(endLine-1, endCol)),
message, DiagnosticSeverity.Error, file)
message, DiagnosticSeverity.Error, file.absolutePath)
val errorItemAfter = convertErrorItems(listOf(errorItem), "dummy").first()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment