Disable running checkers by default (#4644)
* Make checkers be disabled by default * Allow running checkers in test launcher
This commit is contained in:
committed by
Nikolay Krasko
parent
71f44dce0f
commit
77e2b9f9a0
@@ -1,5 +1,6 @@
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.internal.GC
|
||||
import kotlin.native.Platform
|
||||
import kotlin.test.*
|
||||
|
||||
fun test1() {
|
||||
@@ -175,6 +176,7 @@ fun test9() {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
kotlin.native.internal.GC.cyclicCollectorEnabled = true
|
||||
test1()
|
||||
test2()
|
||||
@@ -187,4 +189,4 @@ fun main() {
|
||||
test7()
|
||||
test8()
|
||||
test9()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.internal.GC
|
||||
import kotlin.native.Platform
|
||||
import kotlin.test.*
|
||||
|
||||
class Holder(var other: Any?)
|
||||
@@ -32,6 +33,11 @@ fun assertArrayEquals(
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeTest
|
||||
fun enableMemoryChecker() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
}
|
||||
|
||||
@Test
|
||||
fun noCycles() {
|
||||
val atomic1 = AtomicReference<Any?>(null)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import kotlinx.cinterop.*
|
||||
import kotlin.native.Platform
|
||||
|
||||
fun main() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
StableRef.create(Any())
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlinx.cinterop.*
|
||||
import kotlin.native.Platform
|
||||
|
||||
@BeforeTest
|
||||
fun enableMemoryChecker() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
}
|
||||
|
||||
@Test
|
||||
fun test() {
|
||||
StableRef.create(Any())
|
||||
}
|
||||
Reference in New Issue
Block a user