Minor. Use more granular assertion levels in assertion tests

This commit is contained in:
Ilmir Usmanov
2018-08-06 17:11:32 +03:00
parent 1a1bb53381
commit b4189d9e85
18 changed files with 74 additions and 46 deletions
@@ -3,6 +3,8 @@
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME
package interfaceAssertionsEnabled
interface Checker {
fun checkTrue(): Boolean {
var hit = false
@@ -39,8 +41,8 @@ class Dummy
fun enableAssertions(): Checker {
val loader = Dummy::class.java.classLoader
loader.setDefaultAssertionStatus(true)
val c = loader.loadClass("ShouldBeEnabled")
loader.setPackageAssertionStatus("interfaceAssertionsEnabled", true)
val c = loader.loadClass("interfaceAssertionsEnabled.ShouldBeEnabled")
return c.newInstance() as Checker
}