Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing #148

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions impl/src/test/resources/com/force/formula/impl/formulaTestV2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<formula-test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="formulaTestV2.xsd">

<!--<testcase testName="testABCD"
fieldName="testABCD"
dataType="Boolean"
formula="IF(ISBLANK(a__c),false,AND((VALUE(a__c)==VALUE(b__c)),(VALUE(c__c)==VALUE(d__c))))"
executionPaths="sql,sqlNullAsNull">
<referenceField fieldName="a" dataType="Text"/>
<referenceField fieldName="b" dataType="Text"/>
<referenceField fieldName="c" dataType="Text"/>
<referenceField fieldName="d" dataType="Text"/>
<testData input="null,1,1,1" expectedOutput="false,false"/>
<testData input="1,null,1,1" expectedOutput="false,false"/>
<testData input="1,1,null,1" expectedOutput="false,false"/>
<testData input="1,1,1,null" expectedOutput="false,false"/>
<testData input="1,1,null,null" expectedOutput="false,false"/>
<testData input="1,null,1,null" expectedOutput="false,false"/>
<testData input="null,1,1,null" expectedOutput="false,false"/>
<testData input="1,null,null,1" expectedOutput="false,false"/>
<testData input="null,1,null,1" expectedOutput="false,false"/>
<testData input="null,null,1,1" expectedOutput="false,false"/>
<testData input="null,null,null,1" expectedOutput="false,false"/>
<testData input="1,null,null,null" expectedOutput="false,false"/>
<testData input="null,1,null,null" expectedOutput="false,false"/>
<testData input="null,null,1,null" expectedOutput="false,false"/>
<testData input="null,null,null,null" expectedOutput="false,false"/>
<testData input=",1,1,1" expectedOutput="false,false"/>
<testData input="1,,1,1" expectedOutput="false,false"/>
<testData input="1,1,,1" expectedOutput="false,false"/>
<testData input="1,1,1," expectedOutput="false,false"/>
<testData input="1,1,," expectedOutput="false,false"/>
<testData input="1,,1," expectedOutput="false,false"/>
<testData input=",1,1," expectedOutput="false,false"/>
<testData input="1,,,1" expectedOutput="false,false"/>
<testData input=",1,,1" expectedOutput="false,false"/>
<testData input=",,1,1" expectedOutput="false,false"/>
<testData input=",,,1" expectedOutput="false,false"/>
<testData input="1,,," expectedOutput="false,false"/>
<testData input=",1,," expectedOutput="false,false"/>
<testData input=",,1," expectedOutput="false,false"/>
<testData input=",,," expectedOutput="false,false"/>
</testcase>-->

<testcase testName="testDateTimeValueWithInvalidString"
fieldName="testDateTimeValueWithInvalidString"
dataType="DateOnly"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<formula-test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="/com/force/formula/impl/formulaTestV2.xsd">

<testcase testName="testABCD"
fieldName="testABCD"
dataType="Boolean"
formula="IF(ISBLANK(a__c),false,AND((VALUE(a__c)==VALUE(b__c)),(VALUE(c__c)==VALUE(d__c))))"
executionPaths="sql,sqlNullAsNull">
<referenceField fieldName="a" dataType="Text"/>
<referenceField fieldName="b" dataType="Text"/>
<referenceField fieldName="c" dataType="Text"/>
<referenceField fieldName="d" dataType="Text"/>
<testData input="null,1,1,1" expectedOutput="false,false"/>
<testData input="1,null,1,1" expectedOutput="false,false"/>
<testData input="1,1,null,1" expectedOutput="false,false"/>
<testData input="1,1,1,null" expectedOutput="false,false"/>
<testData input="1,1,null,null" expectedOutput="false,false"/>
<testData input="1,null,1,null" expectedOutput="false,false"/>
<testData input="null,1,1,null" expectedOutput="false,false"/>
<testData input="1,null,null,1" expectedOutput="false,false"/>
<testData input="null,1,null,1" expectedOutput="false,false"/>
<testData input="null,null,1,1" expectedOutput="false,false"/>
<testData input="null,null,null,1" expectedOutput="false,false"/>
<testData input="1,null,null,null" expectedOutput="false,false"/>
<testData input="null,1,null,null" expectedOutput="false,false"/>
<testData input="null,null,1,null" expectedOutput="false,false"/>
<testData input="null,null,null,null" expectedOutput="false,false"/>
<testData input=",1,1,1" expectedOutput="false,false"/>
<testData input="1,,1,1" expectedOutput="false,false"/>
<testData input="1,1,,1" expectedOutput="false,false"/>
<testData input="1,1,1," expectedOutput="false,false"/>
<testData input="1,1,," expectedOutput="false,false"/>
<testData input="1,,1," expectedOutput="false,false"/>
<testData input=",1,1," expectedOutput="false,false"/>
<testData input="1,,,1" expectedOutput="false,false"/>
<testData input=",1,,1" expectedOutput="false,false"/>
<testData input=",,1,1" expectedOutput="false,false"/>
<testData input=",,,1" expectedOutput="false,false"/>
<testData input="1,,," expectedOutput="false,false"/>
<testData input=",1,," expectedOutput="false,false"/>
<testData input=",,1," expectedOutput="false,false"/>
<testData input=",,," expectedOutput="false,false"/>
</testcase>

<!--
<testcase testName="testDateTimeValueWithInvalidString"
fieldName="testDateTimeValueWithInvalidString"
dataType="DateOnly"
Expand Down Expand Up @@ -16172,7 +16215,7 @@
-1.234,
-1.234,
-1.234"/>
<testData input="--1234"
<testData input="-1234"
expectedOutput="Error: com.force.formula.impl.InvalidNumericValueException,
null,
Error: com.force.formula.impl.InvalidNumericValueException,
Expand Down Expand Up @@ -16294,7 +16337,7 @@
1,
1,
1"/>
<testData input="--1234" expectedOutput="0,
<testData input="-1234" expectedOutput="0,
0,
0,
0"/>
Expand Down Expand Up @@ -27905,7 +27948,7 @@
<testcase testName="testConstDoubleNegation"
fieldName="testConstDoubleNegation"
dataType="Double"
formula="customnumber__c -- 2 + customnumber__c - (2-4) + customnumber__c - (-2)"
formula="customnumber__c - 2 + customnumber__c - (2-4) + customnumber__c - (-2)"
executionPaths="formula,sql,formulaNullAsNull,sqlNullAsNull">
<referenceField fieldName="customnumber" dataType="Double"/>
<testData input="" expectedOutput="6,
Expand Down Expand Up @@ -28794,5 +28837,5 @@
3.1415926535897931384626433832795,
3.141592653589793,
3.1415926535897931384626433832795"/>
</testcase>
</testcase> -->
</formula-test>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@
<!-- <module>mysql-test</module> -->
<!-- MYSQL tests having issues in handling regular expressions, so excluding these tests from maven build process-->
<!-- These tests can be executed by using the "mysql" profile e.g. `mvn -P mysql clean verify -B` -->
<module>sqlserver-test</module>
<module>sqlite-test</module>
<!--<module>sqlserver-test</module>
<module>sqlite-test</module>-->
<!-- <module>h2-test</module> -->
<!-- Google spanner is having issues with connection in Jenkins, so excluding these tests from maven build process-->
<!-- These tests can be executed by using the "google-spanner" profile e.g. `mvn -P google-spanner clean verify -B` -->
Expand Down
Loading