use of de.neemann.digital.analyse.expression.NamedExpression in project Digital by hneemann.
the class FormatToExpressionTest method testFormatNamesExp.
public void testFormatNamesExp() throws Exception {
Variable a = v("A");
Variable b = v("B");
Expression e = and(a, b);
NamedExpression n = new NamedExpression("U", e);
assertEquals("U = A ∧ B", FormatToExpression.FORMATTER_UNICODE.format(n));
n = new NamedExpression("V", n);
assertEquals("V = U = A ∧ B", FormatToExpression.FORMATTER_UNICODE.format(n));
}
use of de.neemann.digital.analyse.expression.NamedExpression in project Digital by hneemann.
the class FormatToExpressionTest method testFormatExpLaTeX.
public void testFormatExpLaTeX() throws Exception {
Variable a = new Variable("A_n");
Variable b = new Variable("B_n");
Expression e = new NamedExpression("Y_n+1", and(a, not(b)));
assertEquals("Y_{n+1} = A_{n} \\und \\nicht{B_{n}}", FormatToExpression.FORMATTER_LATEX.format(e));
}
Aggregations