Joffrey
10/04/2021, 4:52 PMrusshwolf
10/04/2021, 5:01 PMexpect val platform
and check against that. Or if you want a slightly higher abstraction, expect val hasFeature
.Joffrey
10/04/2021, 5:03 PMandylamax
10/04/2021, 9:26 PMexpect annotation class
that is only a type alias to the supported platforms.
Then marking your tests with this annotation would effectively only work on the supported platformsephemient
10/04/2021, 10:40 PMactual
on the platforms where you don't want itephemient
10/04/2021, 10:43 PM// commonTest
@OptionalExpectation
expect annotation class JvmIgnore
// jvmTest
actual typealias JvmIgnore = kotlin.test.Ignore
doesn't work. but for nativeTest
it should be fineJoffrey
10/07/2021, 6:03 PM// commonTest
@OptIn(ExperimentalMultiplatform::class)
@OptionalExpectation
expect annotation class IgnoreOnNative()
// iosTest
actual typealias IgnoreOnNative = kotlin.test.Ignore