Remove unneeded default imports in stdlib and tests

This commit is contained in:
Alexander Udalov
2018-09-28 14:57:14 +02:00
parent 199ae3bac8
commit 55c8b35eee
67 changed files with 24 additions and 158 deletions
-1
View File
@@ -6,7 +6,6 @@
package test.comparisons
import kotlin.test.*
import kotlin.comparisons.*
data class Item(val name: String, val rating: Int) : Comparable<Item> {
public override fun compareTo(other: Item): Int {
@@ -4,6 +4,7 @@
*/
@file:Suppress("SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED")
package test.collections
import test.assertStaticTypeIs
@@ -11,7 +12,6 @@ import test.assertTypeEquals
import test.collections.behaviors.*
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
import kotlin.test.*
import kotlin.comparisons.*
import kotlin.random.Random
fun <T> assertArrayNotSameButEquals(expected: Array<out T>, actual: Array<out T>, message: String = "") { assertTrue(expected !== actual && expected contentEquals actual, message) }
@@ -1433,4 +1433,4 @@ private class ArraySortedChecker<A, T>(val array: A, val comparator: Comparator<
array.sorted().iterator().assertSorted { a, b -> comparator.compare(a, b) <= 0 }
array.sortedDescending().iterator().assertSorted { a, b -> comparator.compare(a, b) >= 0 }
}
}
}
@@ -9,7 +9,6 @@ import test.assertStaticAndRuntimeTypeIs
import kotlin.test.*
import test.collections.behaviors.*
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
import kotlin.comparisons.*
import kotlin.math.sin
import kotlin.random.Random
@@ -6,7 +6,6 @@
package test.collections.binarySearch
import kotlin.test.*
import kotlin.comparisons.*
class ListBinarySearchTest {
@@ -6,7 +6,6 @@
package test.collections
import kotlin.test.*
import kotlin.comparisons.*
fun fibonacci(): Sequence<Int> {
// fibonacci terms
@@ -577,4 +576,4 @@ public class SequenceTest {
}
*/
}
}
@@ -6,7 +6,6 @@
package test.collections.js
import kotlin.test.*
import kotlin.comparisons.*
class JsCollectionsTest {
val TEST_LIST = arrayOf(2, 0, 9, 7, 1).toList()
@@ -6,7 +6,6 @@
package numbers
import kotlin.test.*
import kotlin.comparisons.*
val Double.Companion.values get() = listOf(0.0, NEGATIVE_INFINITY, MIN_VALUE, MAX_VALUE, POSITIVE_INFINITY, NaN)
val Float.Companion.values get() = listOf(0.0f, NEGATIVE_INFINITY, MIN_VALUE, MAX_VALUE, POSITIVE_INFINITY, NaN)
@@ -198,4 +197,4 @@ class NaNTotalOrderTest {
fun sequenceTMax() {
totalOrderMaxOf2<Comparable<Any>>({ a, b -> sequenceOf(a, b).max()!! }, "sequenceOf().max()")
}
}
}
@@ -5,10 +5,8 @@
package test.ranges
import kotlin.comparisons.*
import kotlin.test.*
class ProgressionLastElementTest {
private val MAX = Int.MAX_VALUE
+2 -3
View File
@@ -4,9 +4,8 @@
*/
@file:Suppress("NAMED_ARGUMENTS_NOT_ALLOWED") // for common tests
package test.text
import kotlin.text.*
package test.text
import kotlin.test.*
@@ -223,4 +222,4 @@ class RegexTest {
}
}
+1 -2
View File
@@ -5,7 +5,6 @@
package test.utils
import kotlin.*
import kotlin.test.*
class LazyTest {
@@ -43,4 +42,4 @@ class LazyTest {
assertEquals("1", lazyInt.toString())
assertEquals(1, callCount)
}
}
}
-1
View File
@@ -5,7 +5,6 @@
package test.utils
import kotlin.*
import kotlin.test.*
class TODOTest {