diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2018-07-26 20:22:13 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2018-07-26 20:22:13 +0000 |
commit | 3739de6df80d0b20310c3c9d0fcab133fc734b0e (patch) | |
tree | 1c479477855d996101b78d75e82c749bf45b8c60 /src/test | |
parent | dd7b26018c0eacddc7681e48aee1c3cd1cf5c2a6 (diff) | |
download | jackcess-3739de6df80d0b20310c3c9d0fcab133fc734b0e.tar.gz jackcess-3739de6df80d0b20310c3c9d0fcab133fc734b0e.zip |
test TimeSerial; implement DateSerial
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1187 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java index 8248c08..ca1a67c 100644 --- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java @@ -237,6 +237,15 @@ public class DefaultFunctionsTest extends TestCase assertEquals("3:57:34 AM", eval("=CStr(TimeSerial(3,57,34))")); assertEquals("3:57:34 PM", eval("=CStr(TimeSerial(15,57,34))")); + assertEquals("5:45:00 AM", eval("=CStr(TimeSerial(6,-15,0))")); + assertEquals("12:00:00 AM", eval("=CStr(TimeSerial(0,0,0))")); + assertEquals("2:00:00 PM", eval("=CStr(TimeSerial(-10,0,0))")); + assertEquals("6:00:00 AM", eval("=CStr(TimeSerial(30,0,0))")); + + assertEquals("2/12/1969", eval("=CStr(DateSerial(69,2,12))")); + assertEquals("2/12/2010", eval("=CStr(DateSerial(10,2,12))")); + assertEquals("7/12/2013", eval("=CStr(DateSerial(2014,-5,12))")); + assertEquals("8/7/2013", eval("=CStr(DateSerial(2014,-5,38))")); } public void testFinancialFuncs() throws Exception |