Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lacinoire authored and angelozerr committed Jun 21, 2022
1 parent b8e4813 commit 22d0cff
Showing 1 changed file with 7 additions and 9 deletions.
Expand Up @@ -14,9 +14,9 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

import org.eclipse.lsp4j.Position;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

/**
Expand Down Expand Up @@ -158,14 +158,12 @@ public void testEmptyDocumentInc() throws BadLocationException {

@Test
public void testGetLineInformation() throws BadLocationException {
Assertions.assertThrows(BadLocationException.class,
() -> {
TextDocument document = new TextDocument("", "");
document.setIncremental(true);
Position position = document.positionAt(0);
position = new Position(-1, 0);
int offset = document.offsetAt(position);
});
assertThrows(BadLocationException.class, () -> {
TextDocument document = new TextDocument("", "");
document.setIncremental(true);
Position position = new Position(-1, 0);
document.offsetAt(position);
});
}

@Test
Expand Down

0 comments on commit 22d0cff

Please sign in to comment.