Refactor: replace Math.min with minOf in common code.

Add temporary import of kotlin.comparisons where required.
This commit is contained in:
Ilya Gorbunov
2016-11-16 07:49:14 +03:00
parent 51c24a0c3c
commit 844c68286a
11 changed files with 74 additions and 78 deletions
@@ -1,6 +1,7 @@
package test.ranges
import org.junit.Test
import kotlin.comparisons.*
import kotlin.test.assertEquals
@@ -72,7 +73,7 @@ class ProgressionLastElementTest {
var x = start
while (true) {
val next = x + increment
if (next < Math.min(start, end) || next > Math.max(start, end)) break
if (next !in minOf(start, end)..maxOf(start, end)) break
x = next
}