package testCal;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import cal.ExpressionTree;

public class ExpressionTreeTest {

  private ExpressionTree expTree;

  @Before
  public void setUp() throws Exception {
    expTree = new ExpressionTree();
  }

  @After
  public void tearDown() throws Exception {
    expTree = null;
  }

  @Test
  public void testParseToPostfix() {
    String expected = "21-342*+-";
    String result = expTree.parseToPostfix("((2-1)-(3+(4*2)))");
    assertEquals(expected, result);
  }

  @Test
  public void testParseResult() {
    String expected = "-10";
    String result = expTree.parseToPostfix("((2-1)-(3+(4*2)))");
    assertEquals(expected, result);
  }

}

@@ -611,38 +611,35 @@
 eResult() %7B%0A    
-Str
 in
-g
+t
  expected = %22-10
@@ -638,25 +638,20 @@
 d = 
-%22
 -10
-%22
 ;%0A    
-Str
 in
-g
+t
  res
@@ -665,33 +665,30 @@
 xpTree.parse
-ToPostfix
+Result
 (%22((2-1)-(3+

fix testParseResult()