Drop Ranges, Progressions, ProgressionIterators for Double and Float.

Undeprecate generic Comparable.rangeTo, but return private implementation instead.
Undeprecate contains and coerceIn for generic ranges.
This commit is contained in:
Ilya Gorbunov
2015-11-06 18:22:31 +03:00
parent 4d2f9b82da
commit 6bac3e1986
54 changed files with 30 additions and 1630 deletions
@@ -52,25 +52,5 @@ fun box(): String {
return "Wrong elements for 'a'..'d' step 2: $list5"
}
val list6 = ArrayList<Double>()
val range6 = 4.0..5.8 step 0.5
for (i in range6) {
list6.add(i)
if (list6.size() > 23) break
}
if (list6 != listOf<Double>(4.0, 4.5, 5.0, 5.5)) {
return "Wrong elements for 4.0..5.8 step 0.5: $list6"
}
val list7 = ArrayList<Float>()
val range7 = 4.0.toFloat()..5.8.toFloat() step 0.5.toFloat()
for (i in range7) {
list7.add(i)
if (list7.size() > 23) break
}
if (list7 != listOf<Float>(4.0.toFloat(), 4.5.toFloat(), 5.0.toFloat(), 5.5.toFloat())) {
return "Wrong elements for 4.0.toFloat()..5.8.toFloat() step 0.5.toFloat(): $list7"
}
return "OK"
}