mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
remove bad tests
This commit is contained in:
parent
9894c13df6
commit
e12d09448b
@ -21,7 +21,6 @@ class LatexCreatorConstraintsTest {
|
|||||||
private final Model model = new ModelImpl();
|
private final Model model = new ModelImpl();
|
||||||
private TypeInfererInterface typeInferer;
|
private TypeInfererInterface typeInferer;
|
||||||
|
|
||||||
// todo tests should test all of getEverything, not only the first 2 parts
|
|
||||||
@Test
|
@Test
|
||||||
void singleVarDefaultConstraintTest() {
|
void singleVarDefaultConstraintTest() {
|
||||||
typeInferer = model.getTypeInferer("x", new HashMap<>()).unwrap();
|
typeInferer = model.getTypeInferer("x", new HashMap<>()).unwrap();
|
||||||
@ -97,35 +96,4 @@ class LatexCreatorConstraintsTest {
|
|||||||
assertEquals(expected.get(i), actual.get(i));
|
assertEquals(expected.get(i), actual.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void singleAppConstraintTest() {
|
|
||||||
typeInferer = model.getTypeInferer("x y", new HashMap<>()).unwrap();
|
|
||||||
List<String> expected = new LatexCreatorConstraints(typeInferer, Enum::toString).getEverything();
|
|
||||||
|
|
||||||
List<String> actual = List.of(EMPTY_CONSTRAINT_SET,
|
|
||||||
ALIGN_BEGIN + AMPERSAND + CONSTRAINT_SET + EQUALS + LATEX_CURLY_LEFT + TREE_VARIABLE + "_{2}" + EQUALS
|
|
||||||
+ TREE_VARIABLE + "_{3}" + SPACE + RIGHT_ARROW + SPACE + TREE_VARIABLE + "_{1}"
|
|
||||||
+ LATEX_CURLY_RIGHT + ALIGN_END);
|
|
||||||
|
|
||||||
for (int i = 0; i < actual.size(); i++) {
|
|
||||||
assertEquals(actual.get(i), expected.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void singleConstConstraintTest() {
|
|
||||||
typeInferer = model.getTypeInferer("5", new HashMap<>()).unwrap();
|
|
||||||
List<String> expected = new LatexCreatorConstraints(typeInferer, Enum::toString).getEverything();
|
|
||||||
|
|
||||||
List<String> actual = List.of(EMPTY_CONSTRAINT_SET,
|
|
||||||
ALIGN_BEGIN + AMPERSAND + CONSTRAINT_SET + EQUALS + LATEX_CURLY_LEFT + TREE_VARIABLE + "_{1}" + EQUALS
|
|
||||||
+ MONO_TEXT + "{int}" + LATEX_CURLY_RIGHT + ALIGN_END);
|
|
||||||
|
|
||||||
for (int i = 0; i < actual.size(); i++) {
|
|
||||||
assertEquals(actual.get(i), expected.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user