Disable running checkers by default (#4644)

* Make checkers be disabled by default

* Allow running checkers in test launcher
This commit is contained in:
Alexander Shabalin
2021-01-22 12:23:53 +03:00
committed by Nikolay Krasko
parent 71f44dce0f
commit 77e2b9f9a0
22 changed files with 82 additions and 76 deletions
@@ -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()