72aa3d1465
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be compiled against the full JDK - introduce FULL_JDK in-text directive for the reflection test as only 4 tests out of 654 needed the full JDK
22 lines
638 B
Kotlin
Vendored
22 lines
638 B
Kotlin
Vendored
import java.lang.reflect.Modifier
|
|
|
|
class C {
|
|
volatile var vol = 1
|
|
transient val tra = 1
|
|
|
|
strictfp fun str() {}
|
|
synchronized fun sync() {}
|
|
}
|
|
|
|
fun box(): String {
|
|
val c = javaClass<C>()
|
|
|
|
if (c.getDeclaredField("vol").getModifiers() and Modifier.VOLATILE == 0) return "Fail: volatile"
|
|
if (c.getDeclaredField("tra").getModifiers() and Modifier.TRANSIENT == 0) return "Fail: transient"
|
|
|
|
if (c.getDeclaredMethod("str").getModifiers() and Modifier.STRICT == 0) return "Fail: strict"
|
|
if (c.getDeclaredMethod("sync").getModifiers() and Modifier.SYNCHRONIZED == 0) return "Fail: synchronized"
|
|
|
|
return "OK"
|
|
}
|