mirror of
https://github.com/enso-org/enso.git
synced 2024-09-11 13:15:52 +03:00
Add tests for BigDecimal internal representation methods (#9717)
This commit is contained in:
parent
0de490be24
commit
56ae80a66b
@ -943,6 +943,14 @@ add_specs suite_builder =
|
||||
Math.min (Decimal.new "12E70") (Decimal.new "13E70") . should_equal (Decimal.new "12E70")
|
||||
Math.max (Decimal.new "12E70") (Decimal.new "13E70") . should_equal (Decimal.new "13E70")
|
||||
|
||||
suite_builder.group "BigDecimal internal representation methods" group_builder->
|
||||
group_builder.specify "internal accessors should work correctly" <|
|
||||
d = Decimal.new "123.456"
|
||||
d.precision . should_equal 6
|
||||
d.scale . should_equal 3
|
||||
d.unscaled_value . should_equal 123456
|
||||
d.internal_representation . should_equal [123456, 6, 3]
|
||||
|
||||
main =
|
||||
suite = Test.build suite_builder->
|
||||
add_specs suite_builder
|
||||
|
Loading…
Reference in New Issue
Block a user