From 45b7b369184864559d47f6691eddde1fd6362ee6 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Thu, 7 Jul 2011 09:53:36 +0000 Subject: [PATCH] More elapsed time unit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143737 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/usermodel/TestDataFormatter.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java index 2b505ac8b8..e309241a34 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java +++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java @@ -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;@")); -- 2.39.5