1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-09-21 10:52:33 +00:00

Switch Abacus to returning an EvaluationResult with the context.

This commit is contained in:
2017-09-06 22:22:15 -07:00
parent 782669a32b
commit ef1890f24d
4 changed files with 29 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ public class CalculationTests {
TreeNode parsedTree = abacus.parseString(input);
Assert.assertNotNull(parsedTree);
Assert.assertEquals(parsedTree.toString(), parseOutput);
NumberInterface result = abacus.evaluateTree(parsedTree);
NumberInterface result = abacus.evaluateTree(parsedTree).getValue();
Assert.assertNotNull(result);
Assert.assertTrue(result.toString().startsWith(output));
}