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