Control Duration init block assertions on JVM with -ea option

On other platforms enable them unconditionally
This commit is contained in:
Ilya Gorbunov
2021-09-23 12:56:20 +03:00
committed by Space
parent 21a9198fff
commit 7666377565
5 changed files with 15 additions and 6 deletions
@@ -8,6 +8,8 @@ package kotlin.time
import kotlin.js.json
import kotlin.math.*
internal actual inline val durationAssertionsEnabled: Boolean get() = true
internal actual fun formatToExactDecimals(value: Double, decimals: Int): String {
val rounded = if (decimals == 0) {
value