Rearrange stdlib unit tests across packages.

Rearrange JS stdlib unit tests.
This commit is contained in:
Ilya Gorbunov
2016-06-17 00:13:05 +03:00
parent d266f546f4
commit c5a208f3eb
33 changed files with 57 additions and 80 deletions
@@ -17,7 +17,7 @@
package test.collections
import test.collections.behaviors.listBehavior
import test.compare.STRING_CASE_INSENSITIVE_ORDER
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
import java.util.*
import kotlin.test.*
import org.junit.Test as test
@@ -22,11 +22,11 @@ class CollectionJVMTest {
@test fun removeAllWithDifferentEquality() {
val data = listOf(IdentityData(1), IdentityData(1))
val list = data.toArrayList()
val list = data.toMutableList()
list -= identitySetOf(data[0]) as Iterable<IdentityData>
assertTrue(list.single() === data[1], "Identity contains should be used")
val list2 = data.toArrayList()
val list2 = data.toMutableList()
list2 -= hashSetOf(data[0]) as Iterable<IdentityData>
assertTrue(list2.isEmpty(), "Equality contains should be used")
@@ -20,8 +20,7 @@ import java.util.*
import kotlin.test.*
import org.junit.Test as test
import test.collections.behaviors.*
import test.compare.STRING_CASE_INSENSITIVE_ORDER
import java.io.Serializable
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
import kotlin.comparisons.*
class CollectionTest {
@@ -762,11 +761,11 @@ class CollectionTest {
@test fun sortInPlace() {
val data = listOf(11, 3, 7)
val asc = data.toArrayList()
val asc = data.toMutableList()
asc.sort()
assertEquals(listOf(3, 7, 11), asc)
val desc = data.toArrayList()
val desc = data.toMutableList()
desc.sortDescending()
assertEquals(listOf(11, 7, 3), desc)
}
@@ -15,7 +15,7 @@ class MutableCollectionTest {
}
fun <T> testOperation(before: List<T>, after: List<T>, expectedModified: Boolean)
= testOperation(before, after, expectedModified, { it.toArrayList() })
= testOperation(before, after, expectedModified, { it.toMutableList() })
@test fun addAll() {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package collections
package test.collections
import kotlin.test.assertEquals
import org.junit.Test as test
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package collections
package test.collections
import test.collections.behaviors.listBehavior
import test.collections.compare