enable tests

This commit is contained in:
Gregory Travis 2024-07-16 11:00:27 -04:00
parent a894da7ed6
commit 386bc86773
2 changed files with 3 additions and 3 deletions

View File

@ -1128,7 +1128,7 @@ Decimal.from (that : Float) =
is_exceptional = that.is_nan || that.is_infinite
if is_exceptional then Error.throw (Illegal_Argument.Error "Cannot convert "+that.to_text+" to a Decimal") else
handle_java_exception <| attach_loss_of_numeric_precision that <|
Decimal.Value <| Decimal_Utils.fromFloatExact that
Decimal.Value <| Decimal_Utils.fromFloat that
## PRIVATE
Float.from (that : Decimal) = that.to_float

View File

@ -211,7 +211,7 @@ add_specs suite_builder =
(Ordering.hash x0) . should_equal (Ordering.hash x1)
group_builder.specify "should compare correctly to Integer and Float" pending="https://github.com/enso-org/enso/issues/10163" <|
group_builder.specify "should compare correctly to Integer and Float" <|
values = []
+ [[0.1, 0.1]]
+ [["0.1", 0.1]]
@ -313,7 +313,7 @@ add_specs suite_builder =
values.map pr->
v = pr.at 0
d = Decimal.new v . remove_warnings
expected = pr.at 1 . to_float
expected = pr.at 1
d . should_equal expected
expected . should_equal d