mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 22:10:15 +03:00
tests for floating point mod (#9636)
This commit is contained in:
parent
9cf4847a34
commit
6e1295379a
@ -315,7 +315,7 @@ add_specs suite_builder =
|
||||
group_builder.specify "should define multiplication" <|
|
||||
2*3 . should_equal 6
|
||||
|
||||
group_builder.specify "should define modulo for integers and decimals" <|
|
||||
group_builder.specify "should define modulo for integers and floats" <|
|
||||
5%3 . should_equal 2
|
||||
5%3 . should_be_a Integer
|
||||
|
||||
@ -329,6 +329,8 @@ add_specs suite_builder =
|
||||
3.5%2 . should_equal 1.5
|
||||
10.5%1.0 . should_equal 0.5
|
||||
|
||||
11.5%1.5 . should_equal 1.0
|
||||
|
||||
3%1 . should_equal 0
|
||||
3%1 . should_be_a Integer
|
||||
|
||||
@ -354,7 +356,7 @@ add_specs suite_builder =
|
||||
(9223372036854775809 % 10) . should_equal 9
|
||||
(7000000000000000000007 % 10) . should_equal 7
|
||||
|
||||
group_builder.specify "should define modulo for negative integers and decimals" <|
|
||||
group_builder.specify "should define modulo for negative integers and floats" <|
|
||||
-5%3 . should_equal -2
|
||||
-5%3 . should_be_a Integer
|
||||
|
||||
@ -368,6 +370,8 @@ add_specs suite_builder =
|
||||
-3.5%2 . should_equal -1.5
|
||||
-10.5%1.0 . should_equal -0.5
|
||||
|
||||
-11.5%1.5 . should_equal -1.0
|
||||
|
||||
-3%1 . should_equal 0
|
||||
-3%1 . should_be_a Integer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user