Improve stability of lazy test, make some tests take less time

This commit is contained in:
Ilya Gorbunov
2017-11-11 08:01:01 +03:00
parent 934b3cc54e
commit 4827aadcfd
3 changed files with 42 additions and 27 deletions
@@ -60,7 +60,7 @@ class KotlinVersionTest {
val random = java.util.Random()
fun randomComponent(): Int = random.nextInt(KotlinVersion.MAX_COMPONENT_VALUE + 1)
fun randomVersion() = KotlinVersion(randomComponent(), randomComponent(), randomComponent())
repeat(10000) {
repeat(1000) {
val v1 = randomVersion()
val v2 = randomVersion()
if (v1.isAtLeast(v2.major, v2.minor, v2.patch))