Author: nick Date: Tue Apr 7 09:46:32 2020 New Revision: 1876225 URL: http://svn.apache.org/viewvc?rev=1876225&view=rev Log: Add disabled unit test for #64319
Modified: poi/trunk/.classpath poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java Modified: poi/trunk/.classpath URL: http://svn.apache.org/viewvc/poi/trunk/.classpath?rev=1876225&r1=1876224&r2=1876225&view=diff ============================================================================== --- poi/trunk/.classpath (original) +++ poi/trunk/.classpath Tue Apr 7 09:46:32 2020 @@ -45,5 +45,6 @@ <classpathentry kind="lib" path="lib/byte-buddy-1.10.1.jar"/> <classpathentry kind="lib" path="lib/byte-buddy-agent-1.10.1.jar"/> <classpathentry kind="lib" path="compile-lib/batik-all-1.12.jar"/> + <classpathentry kind="lib" path="lib/SparseBitSet-1.2.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java?rev=1876225&r1=1876224&r2=1876225&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java Tue Apr 7 09:46:32 2020 @@ -965,6 +965,33 @@ public class TestDataFormatter { doFormatTestSequential(formatter1); doFormatTestConcurrent(formatter1, formatter2); } + + /** + * Bug #64319 + * + * A custom format string like TRUE shouldn't be E+ + * A numeric format string like 0E0 shouldn't be E+ + * A numeric format string like 0E+0 should be E+ + */ + @Test + @Ignore("Bug #64319 is currently failing") + public void testWithEinFormat() throws Exception { + DataFormatter formatter = new DataFormatter(); + assertEquals("TRUE", formatter.formatRawCellContents(1.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("TRUE", formatter.formatRawCellContents(0.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("FALSE", formatter.formatRawCellContents(-1.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("1E+05", formatter.formatRawCellContents(1e05, 170, + "0E+00")); + assertEquals("1E+10", formatter.formatRawCellContents(1e10, 170, + "0E+00")); + assertEquals("1E5", formatter.formatRawCellContents(1e05, 170, + "0E0")); + assertEquals("1E10", formatter.formatRawCellContents(1e10, 170, + "0E0")); + } private void doFormatTestSequential(DataFormatter formatter) { for (int i = 0; i < 1_000; i++) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org