kotlinx.atomicfu compiler plugin for JS_IR backend (#4581)
* kotlinx.atomicfu compiler plugin for JS_IR Support transformations of atomic operations introduced by the kotlinx.atomicfu library for the JS_IR backend. Compiler plugin is applied externally by the kotlinx.atomicfu gradle plugin. * Apply compiler plugin for JS platform only * New plugin test structure * testGroupOutputDirPrefix changed
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import kotlinx.atomicfu.locks.*
|
||||
import kotlin.test.*
|
||||
|
||||
class SynchronizedObjectTest : SynchronizedObject() {
|
||||
|
||||
fun testSync() {
|
||||
val result = synchronized(this) { bar() }
|
||||
assertEquals("OK", result)
|
||||
}
|
||||
|
||||
private fun bar(): String =
|
||||
synchronized(this) {
|
||||
"OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val testClass = SynchronizedObjectTest()
|
||||
testClass.testSync()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user