Deprecate Double, Float and Comparable range implementations.

This commit is contained in:
Ilya Gorbunov
2015-10-13 20:38:15 +03:00
parent aeb4abe39d
commit 69dc6701cc
15 changed files with 279 additions and 94 deletions
@@ -1,3 +1,4 @@
@file: Suppress("DEPRECATION_ERROR")
package language
import java.lang.Integer.MAX_VALUE as MaxI
@@ -1,3 +1,4 @@
@file: Suppress("DEPRECATION_ERROR")
package language
import org.junit.Test as test
@@ -1,3 +1,4 @@
@file: Suppress("DEPRECATION_ERROR")
package language
import java.lang.Double as jDouble
@@ -1,3 +1,4 @@
@file: Suppress("DEPRECATION_ERROR")
package language
import kotlin.test.*
@@ -65,6 +65,7 @@ class CoercionTest {
}
@Test
@Suppress("DEPRECATION_ERROR")
fun coercionsDouble() {
expect(5.0) { 5.0.coerceAtLeast(1.0) }
expect(5.0) { 1.0.coerceAtLeast(5.0) }
@@ -88,6 +89,7 @@ class CoercionTest {
}
@Test
@Suppress("DEPRECATION_ERROR")
fun coercionsComparable() {
val v = 0..10 map { ComparableNumber(it) }