Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@
<dependency>
<groupId>io.github.liquid-java</groupId>
<artifactId>liquidjava-verifier</artifactId>
<version>0.0.36</version>
<version>0.0.37</version>
</dependency>
<dependency>
<groupId>io.github.liquid-java</groupId>
<artifactId>liquidjava-fsm</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>tools.aqua</groupId>
Expand Down
12 changes: 7 additions & 5 deletions server/src/test/java/utils/DiagnosticConverterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.function.UnaryOperator;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -151,7 +152,8 @@ void preservesRefinementDetailsAndSimplificationHistory() {
VCSimplificationResult found = new VCSimplificationResult(
new VCImplication(new Predicate(new LiteralBoolean(false))), origin, "constant folding");
RefinementErrorDTO dto = (RefinementErrorDTO) DiagnosticConverter.convertToDTO(
new RefinementError(position, position, new Predicate(), found, null, null, "expected true"));
new RefinementError(position, position, new Predicate(), found, null, null, "expected true",
List.of()));
assertEquals("error", dto.category);
assertEquals("refinement-error", dto.type);
assertEquals("true", dto.expected);
Expand All @@ -170,7 +172,7 @@ void preservesStateRefinementDetailsWithoutDeclarationFile() {
StateRefinementErrorDTO dto = (StateRefinementErrorDTO) DiagnosticConverter.convertToDTO(
new StateRefinementError(position, null, new Predicate(new LiteralBoolean(false)),
new VCSimplificationResult(new VCImplication(new Predicate())), null, "expected closed",
List.of(), null, null));
List.of(), null, null, UnaryOperator.identity()));
assertEquals("error", dto.category);
assertEquals("state-refinement-error", dto.type);
assertEquals("false", dto.expected);
Expand All @@ -181,7 +183,7 @@ void preservesStateRefinementDetailsWithoutDeclarationFile() {
}

@Test
void convertsTranslationTablePlacementsAndDisplayNames() {
void convertsTranslationTablePlacementsWithNamesAsInCode() {
TranslationTable table = new TranslationTable();
table.put("#value_12", PlacementInCode.createPlacement(field));
ArgumentMismatchErrorDTO dto = (ArgumentMismatchErrorDTO) DiagnosticConverter.convertToDTO(
Expand All @@ -190,7 +192,7 @@ void convertsTranslationTablePlacementsAndDisplayNames() {
assertEquals("argument-mismatch-error", dto.type);
assertEquals(1, dto.translationTable.size());
assertFalse(dto.translationTable.containsKey("#value_12"));
assertEquals("int value = 0;", dto.translationTable.get("value¹²").text());
assertEquals(dto.position, dto.translationTable.get("value¹²").position());
assertEquals("int value = 0;", dto.translationTable.get("value").text());
assertEquals(dto.position, dto.translationTable.get("value").position());
}
}
Loading