Introduce ClosedComparableRange interface which inherits ClosedRange to provide special comparison operation for double and float.

This commit is contained in:
Ilya Gorbunov
2016-11-25 07:14:14 +03:00
parent 5773594412
commit d60fc7d9a8
6 changed files with 71 additions and 25 deletions
@@ -84,6 +84,8 @@ class CoercionTest {
assertFails { 1.0.coerceIn(1.0, 0.0) }
assertFails { 1.0.coerceIn(1.0..0.0) }
assertTrue(0.0 == 0.0.coerceIn(0.0, -0.0))
assertTrue(0.0 == 0.0.coerceIn(0.0..-0.0))
}
@Test