[jboss-jira] [JBoss JIRA] (DROOLS-1733) Enhance test coverage of FEEL built-in functions

Tibor Zimányi (JIRA) issues at jboss.org
Fri Sep 15 09:49:01 EDT 2017


Tibor Zimányi created DROOLS-1733:
-------------------------------------

             Summary: Enhance test coverage of FEEL built-in functions
                 Key: DROOLS-1733
                 URL: https://issues.jboss.org/browse/DROOLS-1733
             Project: Drools
          Issue Type: Bug
          Components: dmn engine
    Affects Versions: 7.3.0.Final
            Reporter: Tibor Zimányi
            Assignee: Tibor Zimányi
             Fix For: 7.3.1.Final


Majority of classes in module kie-dmn-feel in package org.kie.dmn.feel.runtime.functions can be tested by unit tests. Having such tests we can cover nearly 100% of these classes. 

While coding these tests I found and fixed these bugs and problems: 
* Rounding problem in EvalHelper.getBigDecimalOrNull() method:
    - The method used .doubleValue() call which produced rounding errors
* AnyFunction and AllFunction didn't check if the items in the list parameter are all Booleans (they must be according to the spec.)
* ConcatenateFunction didn't check for nulls in the list parameter
* EqualsFunction didn't compare BigDecimals with compareTo() method (which checks just values and ignores scale)
* MinFunction and MaxFunction didn't check if the items in the list parameter are comparable
* NumberFunction - split of one error message into two
* ReplaceFunction - NPE when having replacement param as null
* StringFunction and CodeFunction contained duplicated code
* SublistFunction - it was possible to input negative length as parameter

I will create a PR with new tests and fixes for mentioned things.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jboss-jira mailing list