-
Bug
-
Resolution: Done
-
Major
-
7.3.0.Final
-
2017 Week 36-37
-
NEW
-
NEW
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
- ReplaceFunction now handles regexp flags
I will create a PR with new tests and fixes for mentioned things.