1 /* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines 6 7 import kotlin.native.concurrent.* 8 import kotlin.native.internal.test.* 9 import kotlin.system.* 10 11 // This is a separate entry point for tests in background mainBackgroundnull12fun mainBackground(args: Array<String>) { 13 val worker = Worker.start(name = "main-background") 14 worker.execute(TransferMode.SAFE, { args.freeze() }) { 15 val result = testLauncherEntryPoint(it) 16 exitProcess(result) 17 }.result // block main thread 18 } 19 20 // This is a separate entry point for tests with leak checker mainNoExitnull21fun mainNoExit(args: Array<String>) { 22 testLauncherEntryPoint(args) 23 }