mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 08:21:49 +03:00
enable tests
This commit is contained in:
parent
a894da7ed6
commit
386bc86773
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user