stdlib tests: move JVM-only test source files

This commit is contained in:
Ilya Gorbunov
2018-01-25 23:28:32 +03:00
parent ba873e2b46
commit 9b38e5e7b5
32 changed files with 0 additions and 17 deletions
@@ -0,0 +1,29 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
@file:JvmVersion
package test.collections
import kotlin.test.*
class MutableCollectionJVMTest {
@Test fun shuffledRnd() {
val rnd1 = java.util.Random(42L)
val rnd2 = java.util.Random(42L)
val list = MutableList(100) { it }
val shuffled1 = list.shuffled(rnd1)
val shuffled2 = list.shuffled(rnd2)
assertNotEquals(list, shuffled1)
assertEquals(list.toSet(), shuffled1.toSet())
assertEquals(list.size, shuffled1.distinct().size)
assertEquals(shuffled1, shuffled2)
}
}