]> source.dussan.org Git - poi.git/commitdiff
More elapsed time unit tests
authorNick Burch <nick@apache.org>
Thu, 7 Jul 2011 09:53:36 +0000 (09:53 +0000)
committerNick Burch <nick@apache.org>
Thu, 7 Jul 2011 09:53:36 +0000 (09:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143737 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java

index 2b505ac8b8d5ac4a5568e12374675291ce7102f7..e309241a34a0b53b5069de3bcf1cf4b30da755d6 100644 (file)
@@ -311,7 +311,15 @@ public class TestDataFormatter extends TestCase {
        assertEquals("120", dfUS.formatRawCellContents(120*second, -1, "[ss]"));
        assertEquals("121", dfUS.formatRawCellContents(121*second, -1, "[ss]"));
 
-       assertEquals("28:48:00",dfUS.formatRawCellContents(1.2, -1, "[h]:mm:ss"));
+       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;@"));