From add5fa6e0d3b9d4e9994a5e701182e3a8b92b5c1 Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Thu, 29 Dec 2022 05:29:32 +0000 Subject: [PATCH] [Wasm] Minor: remove unused stdlib stub Merge-request: KT-MR-8140 Merged-by: Svyatoslav Kuzmich --- libraries/stdlib/wasm/stubs/testHelpers.kt | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 libraries/stdlib/wasm/stubs/testHelpers.kt diff --git a/libraries/stdlib/wasm/stubs/testHelpers.kt b/libraries/stdlib/wasm/stubs/testHelpers.kt deleted file mode 100644 index 0abb0b3909e..00000000000 --- a/libraries/stdlib/wasm/stubs/testHelpers.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package kotlin.test - -import kotlin.internal.InlineOnly -import kotlin.internal.OnlyInputTypes - -// TODO: Remove this once we support CLASS_REFERENCE IR node -@InlineOnly -public inline fun assertFailsWith(message: String? = null, block: () -> Unit): T { - var throwable: Throwable? = null - try { - block() - } catch (e: Throwable) { - throwable = e - } - return throwable as? T ?: throw AssertionError("assertFailsWith failed: $message") -}