mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-10 03:10:44 +00:00
Checkstyle in tests
This commit is contained in:
parent
835188466b
commit
7bf691a693
@ -17,13 +17,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class ConclusionTest {
|
||||
|
||||
private static final Map<VarTerm, TypeAbstraction> typeAssumptions = new HashMap<>();
|
||||
private static final LambdaTerm lambdaTerm = new VarTerm("var");
|
||||
private static final Type type = new NamedType("type");
|
||||
private static final Map<VarTerm, TypeAbstraction> TYPE_ASSUMPTIONS = new HashMap<>();
|
||||
private static final LambdaTerm LAMBDA_TERM = new VarTerm("var");
|
||||
private static final Type TYPE = new NamedType("type");
|
||||
|
||||
@BeforeAll
|
||||
static void setUp() {
|
||||
typeAssumptions.put(new VarTerm("var2"), new TypeAbstraction(new NamedType("type2"), new ArrayList<>()));
|
||||
TYPE_ASSUMPTIONS.put(new VarTerm("var2"), new TypeAbstraction(new NamedType("type2"), new ArrayList<>()));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -34,19 +34,19 @@ class ConclusionTest {
|
||||
|
||||
@Test
|
||||
void getTypeAssumptionsTest() {
|
||||
Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type);
|
||||
assertEquals(typeAssumptions, conclusion.getTypeAssumptions());
|
||||
Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE);
|
||||
assertEquals(TYPE_ASSUMPTIONS, conclusion.getTypeAssumptions());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getLambdaTermTest() {
|
||||
Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type);
|
||||
assertEquals(lambdaTerm, conclusion.getLambdaTerm());
|
||||
Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE);
|
||||
assertEquals(LAMBDA_TERM, conclusion.getLambdaTerm());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getTypeTest() {
|
||||
Conclusion conclusion = new Conclusion(typeAssumptions, lambdaTerm, type);
|
||||
assertEquals(type, conclusion.getType());
|
||||
Conclusion conclusion = new Conclusion(TYPE_ASSUMPTIONS, LAMBDA_TERM, TYPE);
|
||||
assertEquals(TYPE, conclusion.getType());
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class ConstraintTest {
|
||||
|
||||
private static final Type type1 = new TypeVariable(TypeVariableKind.USER_INPUT, 1);
|
||||
private static final Type type2 = new TypeVariable(TypeVariableKind.TREE, 2);
|
||||
private static final Type TYPE_1 = new TypeVariable(TypeVariableKind.USER_INPUT, 1);
|
||||
private static final Type TYPE_2 = new TypeVariable(TypeVariableKind.TREE, 2);
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
@ -20,13 +20,13 @@ class ConstraintTest {
|
||||
|
||||
@Test
|
||||
void getFirstTest() {
|
||||
Constraint con = new Constraint(type1,type2);
|
||||
assertEquals(type1, con.getFirstType());
|
||||
Constraint con = new Constraint(TYPE_1, TYPE_2);
|
||||
assertEquals(TYPE_1, con.getFirstType());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getSecondTest() {
|
||||
Constraint con = new Constraint(type1,type2);
|
||||
assertEquals(type2, con.getSecondType());
|
||||
Constraint con = new Constraint(TYPE_1, TYPE_2);
|
||||
assertEquals(TYPE_2, con.getSecondType());
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class SubstitutionTest {
|
||||
|
||||
private static final TypeVariable var = new TypeVariable(TypeVariableKind.USER_INPUT, 1);
|
||||
private static final Type type = new TypeVariable(TypeVariableKind.TREE, 2);
|
||||
private static final TypeVariable VAR = new TypeVariable(TypeVariableKind.USER_INPUT, 1);
|
||||
private static final Type TYPE = new TypeVariable(TypeVariableKind.TREE, 2);
|
||||
|
||||
@Test
|
||||
void equalsTest() {
|
||||
@ -20,13 +20,13 @@ class SubstitutionTest {
|
||||
|
||||
@Test
|
||||
void getVariableTest() {
|
||||
Substitution sub = new Substitution(var,type);
|
||||
assertEquals(var, sub.getVariable());
|
||||
Substitution sub = new Substitution(VAR, TYPE);
|
||||
assertEquals(VAR, sub.getVariable());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getTypeTest() {
|
||||
Substitution sub = new Substitution(var,type);
|
||||
assertEquals(type, sub.getType());
|
||||
Substitution sub = new Substitution(VAR, TYPE);
|
||||
assertEquals(TYPE, sub.getType());
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class TypeVariableFactoryTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void createDistinctTypeVariables_100() {
|
||||
void createDistinctTypeVariables100() {
|
||||
TypeVariableFactory factory = new TypeVariableFactory(TypeVariableKind.TREE);
|
||||
|
||||
TypeVariable[] typeVariables = new TypeVariable[100];
|
||||
|
Loading…
Reference in New Issue
Block a user