From 110b643b9f376dd4246ada889d0667ab1a13836b Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Sun, 28 Apr 2002 16:40:18 +0000 Subject: [PATCH] tests parenthesis git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352528 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/usermodel/TestFormulas.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java index dfe4bb912..1dee21cc6 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java @@ -181,6 +181,14 @@ extends TestCase { throws Exception { orderTest("1*2+3^4"); } + + /** + * Tests that parenthesis are obeyed + */ + public void testParenthesis() + throws Exception { + orderTest("(1*3)+2+(1+2)*(3^4)^5"); + } /** * tests order wrting out == order writing in for a given formula @@ -279,7 +287,7 @@ extends TestCase { //get our minimum values r = s.getRow((short)0); c = r.getCell((short)1); - assertTrue("minval Formula is as expected", + assertTrue("minval Formula is as expected 1"+operator+"1 != "+c.getCellFormula(), ( ("1"+operator+"1").equals(c.getCellFormula()) ));