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,3 +1,5 @@
|
||||
import kotlin.native.Platform
|
||||
|
||||
// The following 2 singletons are unused. However, since we are generating ObjC bindings for them,
|
||||
// they should be marked as used, so that the code generator emits their deinitialization.
|
||||
|
||||
@@ -10,3 +12,7 @@ class B {
|
||||
fun foo() = 2
|
||||
}
|
||||
}
|
||||
|
||||
fun enableMemoryChecker() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ class Results {
|
||||
|
||||
func runTestKt42397(pointer: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? {
|
||||
autoreleasepool {
|
||||
KnlibraryKt.enableMemoryChecker()
|
||||
let results = pointer.bindMemory(to: Results.self, capacity: 1).pointee
|
||||
results.aFoo = A().foo()
|
||||
results.bFoo = B.Companion().foo()
|
||||
|
||||
Reference in New Issue
Block a user