mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
Merge branch 'master' of https://git.scc.kit.edu/pse-typinferenz/typicalc
This commit is contained in:
commit
e85b39c93e
@ -3,12 +3,15 @@ package edu.kit.typicalc.model;
|
||||
import edu.kit.typicalc.model.step.*;
|
||||
import edu.kit.typicalc.model.term.*;
|
||||
import edu.kit.typicalc.model.type.*;
|
||||
import nl.jqno.equalsverifier.EqualsVerifier;
|
||||
import nl.jqno.equalsverifier.Warning;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
class TreeTest {
|
||||
|
||||
@ -164,4 +167,12 @@ class TreeTest {
|
||||
constraints.add(varRightConstraint);
|
||||
assertEquals(constraints, tree.getConstraints());
|
||||
}
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
EqualsVerifier.forClass(Tree.class).usingGetClass()
|
||||
.withIgnoredFields("typeVarFactory", "stepFactory")
|
||||
.suppress(Warning.NONFINAL_FIELDS)
|
||||
.verify();
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import edu.kit.typicalc.model.type.FunctionType;
|
||||
import edu.kit.typicalc.model.type.Type;
|
||||
import edu.kit.typicalc.model.type.TypeVariable;
|
||||
import edu.kit.typicalc.model.type.TypeVariableKind;
|
||||
import nl.jqno.equalsverifier.EqualsVerifier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -71,4 +72,9 @@ class TypeInferenceResultTest {
|
||||
Type expectedType = new FunctionType(A_2, new FunctionType(new FunctionType(A_2, A_5), A_5));
|
||||
assertEquals(expectedType, result.getType());
|
||||
}
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
EqualsVerifier.forClass(TypeInferenceResult.class).usingGetClass().verify();
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import edu.kit.typicalc.model.term.VarTerm;
|
||||
import edu.kit.typicalc.model.type.TypeAbstraction;
|
||||
import edu.kit.typicalc.model.type.TypeVariable;
|
||||
import edu.kit.typicalc.model.type.TypeVariableKind;
|
||||
import nl.jqno.equalsverifier.EqualsVerifier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.*;
|
||||
@ -45,4 +46,9 @@ class TypeInfererLetTest {
|
||||
= new ArrayList<>(Collections.singletonList(new Constraint(variable2, generated1)));
|
||||
assertEquals(expectedLetConstraints, typeInfererLet.getLetConstraints());
|
||||
}
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
EqualsVerifier.forClass(TypeInfererLet.class).usingGetClass().verify();
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import edu.kit.typicalc.model.type.FunctionType;
|
||||
import edu.kit.typicalc.model.type.TypeVariable;
|
||||
import edu.kit.typicalc.model.type.TypeVariableKind;
|
||||
import edu.kit.typicalc.util.Result;
|
||||
import nl.jqno.equalsverifier.EqualsVerifier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
@ -101,4 +102,9 @@ class UnificationTest {
|
||||
UnificationError.INFINITE_TYPE
|
||||
), new ArrayList<>()), steps.get(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
EqualsVerifier.forClass(Unification.class).usingGetClass().verify();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user