diff options
author | PJ Fanning <fanningpj@apache.org> | 2017-07-03 16:16:35 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2017-07-03 16:16:35 +0000 |
commit | dc0a33679cd5fc57e3ef4357a6a1a9e94857ba91 (patch) | |
tree | d94503b9b887d0fb1e3e9a3d194297046a162aba /src/testcases/org/apache/poi/ss | |
parent | 7557a4a6a3eee68a0939fd3a299bfc9833088e19 (diff) | |
download | poi-dc0a33679cd5fc57e3ef4357a6a1a9e94857ba91.tar.gz poi-dc0a33679cd5fc57e3ef4357a6a1a9e94857ba91.zip |
Remove check for jdk1.5 in test because POI now only supports jre1.6 and up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800696 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java index 5c2bb63953..679404f141 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java +++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java @@ -497,28 +497,21 @@ public class TestDataFormatter { assertEquals("120", dfUS.formatRawCellContents(120*second, -1, "[ss]")); assertEquals("121", dfUS.formatRawCellContents(121*second, -1, "[ss]")); - boolean jdk_1_5 = System.getProperty("java.vm.version").startsWith("1.5"); - if(!jdk_1_5) { - // YK: the tests below were written under JDK 1.6 and assume that - // the rounding mode in the underlying decimal formatters is HALF_UP - // It is not so JDK 1.5 where the default rounding mode is HALV_EVEN and cannot be changed. - - assertEquals("27:18:08", dfUS.formatRawCellContents(1.1376, -1, "[h]:mm:ss")); - assertEquals("28:48:00", dfUS.formatRawCellContents(1.2, -1, "[h]:mm:ss")); - assertEquals("29:31:12", dfUS.formatRawCellContents(1.23, -1, "[h]:mm:ss")); - assertEquals("31:26:24", dfUS.formatRawCellContents(1.31, -1, "[h]:mm:ss")); - - assertEquals("27:18:08", dfUS.formatRawCellContents(1.1376, -1, "[hh]:mm:ss")); - assertEquals("28:48:00", dfUS.formatRawCellContents(1.2, -1, "[hh]:mm:ss")); - assertEquals("29:31:12", dfUS.formatRawCellContents(1.23, -1, "[hh]:mm:ss")); - assertEquals("31:26:24", dfUS.formatRawCellContents(1.31, -1, "[hh]:mm:ss")); - - assertEquals("57:07.2", dfUS.formatRawCellContents(.123, -1, "mm:ss.0;@")); - assertEquals("57:41.8", dfUS.formatRawCellContents(.1234, -1, "mm:ss.0;@")); - assertEquals("57:41.76", dfUS.formatRawCellContents(.1234, -1, "mm:ss.00;@")); - assertEquals("57:41.760", dfUS.formatRawCellContents(.1234, -1, "mm:ss.000;@")); - assertEquals("24:00.0", dfUS.formatRawCellContents(123456.6, -1, "mm:ss.0")); - } + assertEquals("27:18:08", dfUS.formatRawCellContents(1.1376, -1, "[h]:mm:ss")); + assertEquals("28:48:00", dfUS.formatRawCellContents(1.2, -1, "[h]:mm:ss")); + assertEquals("29:31:12", dfUS.formatRawCellContents(1.23, -1, "[h]:mm:ss")); + assertEquals("31:26:24", dfUS.formatRawCellContents(1.31, -1, "[h]:mm:ss")); + + assertEquals("27:18:08", dfUS.formatRawCellContents(1.1376, -1, "[hh]:mm:ss")); + assertEquals("28:48:00", dfUS.formatRawCellContents(1.2, -1, "[hh]:mm:ss")); + assertEquals("29:31:12", dfUS.formatRawCellContents(1.23, -1, "[hh]:mm:ss")); + assertEquals("31:26:24", dfUS.formatRawCellContents(1.31, -1, "[hh]:mm:ss")); + + assertEquals("57:07.2", dfUS.formatRawCellContents(.123, -1, "mm:ss.0;@")); + assertEquals("57:41.8", dfUS.formatRawCellContents(.1234, -1, "mm:ss.0;@")); + assertEquals("57:41.76", dfUS.formatRawCellContents(.1234, -1, "mm:ss.00;@")); + assertEquals("57:41.760", dfUS.formatRawCellContents(.1234, -1, "mm:ss.000;@")); + assertEquals("24:00.0", dfUS.formatRawCellContents(123456.6, -1, "mm:ss.0")); } @Test |