summaryrefslogtreecommitdiff
path: root/runtime/commonTest/src/kotlinx/serialization/test/CurrentPlatform.common.kt
blob: 2a9f9f0bd2b933e0bd8db547fb4ecde59d22ce41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Copyright 2017-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package kotlinx.serialization.test

enum class Platform {
    JVM, JS, NATIVE
}

public expect val currentPlatform: Platform

public fun isJs(): Boolean = currentPlatform == Platform.JS
public fun isJvm(): Boolean = currentPlatform == Platform.JVM
public fun isNative(): Boolean = currentPlatform == Platform.NATIVE