We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3900cf commit ed02ba8Copy full SHA for ed02ba8
junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt
@@ -29,6 +29,18 @@ import kotlin.contracts.contract
29
fun fail(message: String?, throwable: Throwable? = null): Nothing =
30
Assertions.fail<Nothing>(message, throwable)
31
32
+/**
33
+ * @see Assertions.fail
34
+ */
35
+@JvmName("fail_nonNullableLambda")
36
+fun fail(message: () -> String): Nothing {
37
+ contract {
38
+ callsInPlace(message)
39
+ }
40
+
41
+ return Assertions.fail<Nothing>(message)
42
+}
43
44
/**
45
* @see Assertions.fail
46
*/
0 commit comments