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,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
@file:OptIn(ExperimentalStdlibApi::class)
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.native.internal.*
|
||||
|
||||
// This cleaner won't be run, because it's deinitialized with globals after
|
||||
// cleaners are disabled.
|
||||
val globalCleaner = createCleaner(42) {
|
||||
println(it)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
// Cleaner holds onto a finalization lambda. If it doesn't get executed,
|
||||
// the memory will leak. Suppress memory leak checker to check for cleaners
|
||||
// leak only.
|
||||
Platform.isMemoryLeakCheckerActive = false
|
||||
// Make sure cleaner is initialized.
|
||||
assertNotNull(globalCleaner)
|
||||
}
|
||||
@@ -16,10 +16,6 @@ val globalCleaner = createCleaner(42) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
// Cleaner holds onto a finalization lambda. If it doesn't get executed,
|
||||
// the memory will leak. Suppress memory leak checker to check for cleaners
|
||||
// leak only.
|
||||
Platform.isMemoryLeakCheckerActive = false
|
||||
Platform.isCleanersLeakCheckerActive = true
|
||||
// Make sure cleaner is initialized.
|
||||
assertNotNull(globalCleaner)
|
||||
|
||||
@@ -16,11 +16,6 @@ val globalCleaner = createCleaner(42) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
// Cleaner holds onto a finalization lambda. If it doesn't get executed,
|
||||
// the memory will leak. Suppress memory leak checker to check for cleaners
|
||||
// leak only.
|
||||
Platform.isMemoryLeakCheckerActive = false
|
||||
Platform.isCleanersLeakCheckerActive = false
|
||||
// Make sure cleaner is initialized.
|
||||
assertNotNull(globalCleaner)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user