1 /* 2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 package kotlinx.coroutines.test 5 testResultChainnull6actual fun testResultChain(block: () -> TestResult, after: (Result<Unit>) -> TestResult): TestResult { 7 try { 8 block() 9 after(Result.success(Unit)) 10 } catch (e: Throwable) { 11 after(Result.failure(e)) 12 } 13 } 14