From c46aee15a152c83578111a3974047685d702a00c Mon Sep 17 00:00:00 2001 From: ucrhh Date: Fri, 12 Feb 2021 15:23:38 +0100 Subject: [PATCH] swap parentheses with curly --- .../latexcreator/LatexCreatorConstraints.java | 2 +- .../latexcreator/LatexCreatorConstraintsTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java index 3c5bffb..6af64fd 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java @@ -234,7 +234,7 @@ public class LatexCreatorConstraints implements StepVisitor { } if (!unificationConstraints.isEmpty()) { // todo somehow this gets colored red too when an error occurs - latex.append(PAREN_RIGHT + LATEX_CURLY_RIGHT + LATEX_NEW_LINE); + latex.append(LATEX_CURLY_RIGHT + PAREN_RIGHT + LATEX_NEW_LINE); } List substitutions = subs.unwrap(); diff --git a/src/test/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraintsTest.java b/src/test/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraintsTest.java index 2098400..890bb42 100644 --- a/src/test/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraintsTest.java +++ b/src/test/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraintsTest.java @@ -37,8 +37,8 @@ class LatexCreatorConstraintsTest { List expected = List.of(EMPTY_CONSTRAINT_SET, ALIGN_BEGIN + constraintSet + ALIGN_END, ALIGN_BEGIN + constraintSet + MGU_START + EQUALS + UNIFY + PAREN_LEFT + LATEX_CURLY_LEFT + AMPERSAND - + TREE_VARIABLE + "_{1}" + EQUALS + GENERATED_ASSUMPTION_VARIABLE + "_{1}" + PAREN_RIGHT - + LATEX_CURLY_RIGHT + SPLIT_END + ALIGN_END, + + TREE_VARIABLE + "_{1}" + EQUALS + GENERATED_ASSUMPTION_VARIABLE + "_{1}" + LATEX_CURLY_RIGHT + + PAREN_RIGHT + SPLIT_END + ALIGN_END, ALIGN_BEGIN + constraintSet + MGU_START + mgu + ALIGN_END, ALIGN_BEGIN + constraintSet + MGU_START + mgu + ALIGN_END, ALIGN_BEGIN + constraintSet + MGU_START + mgu + LATEX_NEW_LINE + AMPERSAND + SIGMA + PAREN_LEFT @@ -82,8 +82,8 @@ class LatexCreatorConstraintsTest { ALIGN_BEGIN + constraintSet2 + ALIGN_END, ALIGN_BEGIN + constraintSet2 + unify1 + COMMA + LATEX_NEW_LINE + AMPERSAND + TREE_VARIABLE + "_{1}" + EQUALS + TREE_VARIABLE + "_{2}" + SPACE + RIGHT_ARROW + SPACE + TREE_VARIABLE + "_{3}" - + PAREN_RIGHT + LATEX_CURLY_RIGHT + SPLIT_END + ALIGN_END, - ALIGN_BEGIN + constraintSet2 + unify1 + PAREN_RIGHT + LATEX_CURLY_RIGHT + subs2 + SPLIT_END + ALIGN_END, + + LATEX_CURLY_RIGHT + PAREN_RIGHT + SPLIT_END + ALIGN_END, + ALIGN_BEGIN + constraintSet2 + unify1 + LATEX_CURLY_RIGHT + PAREN_RIGHT + subs2 + SPLIT_END + ALIGN_END, ALIGN_BEGIN + constraintSet2 + MGU_START + EQUALS + BRACKET_LEFT + AMPERSAND + TREE_VARIABLE + "_{3}" + SUBSTITUTION_SIGN + GENERATED_ASSUMPTION_VARIABLE + "_{1}" + BRACKET_RIGHT + subs2 + SPLIT_END + ALIGN_END,