finos/morphir-jvm

Decimal.gte does not behave as expected

AttilaMihaly opened this issue · 1 comments

Describe the bug
Decimal.gte return false even when the two values being compared are equal.

To Reproduce
Call Decimal.gte with two values that are equal.

Expected behavior
It should return true when the values are equal.

The issue is that compareTo is used incorrectly since it should be compared to 0 not 1:

def gte(a: Decimal)(b: Decimal): morphir.sdk.Bool.Bool = a.compareTo(b) >= 1