Replace random val in companion object with top level val

This commit is contained in:
Sergey Bogolepov
2018-09-20 16:50:38 +03:00
committed by Pavel Punegov
parent 17b7bbce8c
commit 2f1f32bbf4
+3 -5
View File
@@ -566,12 +566,10 @@ class DefaultRandomSmokeTest : RandomSmokeTest() {
override val subject: Random get() = Random
}
class SeededRandomSmokeTest : RandomSmokeTest() {
override val subject: Random get() = staticSubject
private val seededRandomSmokeTestSubject = Random(Random.nextInt().also { println("Seed: $it") })
companion object {
val staticSubject = Random(Random.nextInt().also { println("Seed: $it") })
}
class SeededRandomSmokeTest : RandomSmokeTest() {
override val subject: Random get() = seededRandomSmokeTestSubject
@Test
fun sameIntSeed() {