Use mock JDK in compiler tests where full JDK is not needed
- 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
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user