diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2018-11-02 20:14:59 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2018-11-02 20:14:59 +0000 |
commit | 504a1d8c0b68ba1235e2ffb56d957f23eb515a35 (patch) | |
tree | 7a205974a8a043979973df0892dac7d49a350077 /src/test | |
parent | 45f64df5c56c518a9829f80cadf710f76e58e464 (diff) | |
download | jackcess-504a1d8c0b68ba1235e2ffb56d957f23eb515a35.tar.gz jackcess-504a1d8c0b68ba1235e2ffb56d957f23eb515a35.zip |
implement Val function
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1214 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java | 10 |
1 files changed, 10 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 5f0a045..98aea88 100644 --- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java +++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java @@ -195,6 +195,16 @@ public class DefaultFunctionsTest extends TestCase } catch(EvalException e) { assertTrue(e.getMessage().contains("Invalid function call")); } + + assertEquals(1615198d, eval("=Val(' 1615 198th Street N.E.')")); + assertEquals(-1d, eval("=Val(' &HFFFFwhatever')")); + assertEquals(131071d, eval("=Val(' &H1FFFFwhatever')")); + assertEquals(-1d, eval("=Val(' &HFFFFFFFFwhatever')")); + assertEquals(291d, eval("=Val(' &H123whatever')")); + assertEquals(83d, eval("=Val(' &O123whatever')")); + assertEquals(1.23d, eval("=Val(' 1 2 3 e -2 whatever')")); + assertEquals(0d, eval("=Val(' whatever123 ')")); + assertEquals(0d, eval("=Val('')")); } public void testNumberFuncs() throws Exception |