From 2c7de4777134fd69d8043aaebd04c377f8b550fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp=20=28TWiStErRob=29?= Date: Sat, 2 Dec 2023 12:42:28 +0000 Subject: [PATCH] Use trimIndent in a human-friendly way. --- .../main/kotlin/org/mockito/kotlin/Verification.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mockito-kotlin/src/main/kotlin/org/mockito/kotlin/Verification.kt b/mockito-kotlin/src/main/kotlin/org/mockito/kotlin/Verification.kt index 39653f24..e8437731 100644 --- a/mockito-kotlin/src/main/kotlin/org/mockito/kotlin/Verification.kt +++ b/mockito-kotlin/src/main/kotlin/org/mockito/kotlin/Verification.kt @@ -270,11 +270,12 @@ fun only(): VerificationMode { inline fun check(noinline predicate: (T) -> Unit): T { return Mockito.argThat { arg: T? -> if (arg == null) error( - """The argument passed to the predicate was null. - -If you are trying to verify an argument to be null, use `isNull()`. -If you are using `check` as part of a stubbing, use `argThat` or `argForWhich` instead. -""".trimIndent() + """ + The argument passed to the predicate was null. + + If you are trying to verify an argument to be null, use `isNull()`. + If you are using `check` as part of a stubbing, use `argThat` or `argForWhich` instead. + """.trimIndent() ) try {