BUG FIX: Fix correct formatting around the operator.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981626 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2010-08-02 17:42:55 +00:00
parent 33809facfe
commit 46b66d2bd2
2 changed files with 5 additions and 5 deletions
@@ -61,7 +61,7 @@ public final class MathValue extends StaticValue implements Iterable<ConstantVal
public StringBuilder appendTo(StringBuilder sb) {
sb.append('(');
StringUtil.appendTo(sb, values, " ", null, op);
StringUtil.appendTo(sb, values, null, null, " ", op, " ");
sb.append(')');
return sb;
}
@@ -135,13 +135,13 @@ public class ValuesTest extends GenericTestCaseBase {
public void testMathValue() {
MathValue v1 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv2));
mathValueTest("v1", v1, "+", list(nv1, nv2), "( 1+ 2.0)", null, false);
mathValueTest("v1", v1, "+", list(nv1, nv2), "(1 + 2.0)", null, false);
MathValue v2 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv3));
mathValueTest("v2", v2, "+", list(nv1, nv3), "( 1+ 3)", v1, false);
mathValueTest("v2", v2, "+", list(nv1, nv3), "(1 + 3)", v1, false);
MathValue v3 = new MathValue("+", GenericTestCaseBase.<ConstantValue>list(nv1, nv2));
mathValueTest("v3", v3, "+", list(nv1, nv2), "( 1+ 2.0)", v1, true);
mathValueTest("v3", v3, "+", list(nv1, nv2), "(1 + 2.0)", v1, true);
MathValue v4 = new MathValue("-", GenericTestCaseBase.<ConstantValue>list(nv1, nv3));
mathValueTest("v4", v4, "-", list(nv1, nv3), "( 1- 3)", v1, false);
mathValueTest("v4", v4, "-", list(nv1, nv3), "(1 - 3)", v1, false);
}
public void testNull() {