Refactor helper function to run/not run block of common code on specific platform
Use it in StringBuilder tests
This commit is contained in:
committed by
Space Team
parent
454e963aa7
commit
ace2279631
@@ -12,8 +12,7 @@ public actual fun assertTypeEquals(expected: Any?, actual: Any?) {
|
||||
assertEquals(expected?.javaClass, actual?.javaClass)
|
||||
}
|
||||
|
||||
public actual fun testOnJvm(action: () -> Unit) = action()
|
||||
public actual fun testOnJs(action: () -> Unit) {}
|
||||
public actual val TestPlatform.Companion.current: TestPlatform get() = TestPlatform.Jvm
|
||||
|
||||
@Suppress("HasPlatformType", "UNCHECKED_CAST")
|
||||
public fun <T> platformNull() = Collections.singletonList(null as T).first()
|
||||
|
||||
Reference in New Issue
Block a user