Refactor: extract JVM-specific tests into separate files

Make KotlinVersion random comparison test running in JS
This commit is contained in:
Ilya Gorbunov
2018-03-21 18:52:00 +03:00
parent 2d099a29b8
commit 7a40b4c5f1
12 changed files with 260 additions and 204 deletions
@@ -22,6 +22,9 @@ public fun assertTypeEquals(expected: Any?, actual: Any?) {
assertEquals(expected?.let { it::class.js }, actual?.let { it::class.js })
}
@Suppress("DEPRECATION")
public fun randomInt(limit: Int): Int = (kotlin.js.Math.random() * limit).toInt()
@Suppress("NOTHING_TO_INLINE")
internal inline fun String.removeLeadingPlusOnJava6(): String = this
internal fun doubleTotalOrderEquals(a: Double?, b: Double?) = a == b || (a != a && b != b)