tkobayas commented on code in PR #7077:
URL: https://github.com/apache/incubator-kie/pull/7077#discussion_r3879304271
##########
drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/MvelDialectTest.java:
##########
@@ -763,7 +763,7 @@ public void
testCompoundOperatorBigDecimalConstantWithoutLiterals(RUN_TYPE runTy
ksession.insert(john);
assertThat(ksession.fireAllRules()).isEqualTo(1);
- assertThat(john.getMoney()).isEqualTo(new BigDecimal( 0 ));
+ assertThat(john.getMoney()).isEqualByComparingTo(new BigDecimal( 0 ));
Review Comment:
The result is BigDecimal `0.0`, so failed with `isEqualTo`. The scale
difference was introduced by https://github.com/mvel/mvel/issues/321. I think
using `isEqualByComparingTo` is rather correct, because it doesn't make sense
to be strict about scale when calculating with double.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]