aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/utils
diff options
context:
space:
mode:
authorGoooler <wangzongler@gmail.com>2022-02-21 22:01:06 +0800
committerGitHub <noreply@github.com>2022-02-21 17:01:06 +0300
commitf5b7797255576e5f1c230e2ca3fcb5f4e602387c (patch)
tree25fd98250066c4ed6c2fff1104be533604bbf1b9 /plugins/base/src/test/kotlin/utils
parentdf4780c31026aaa626746f49f0e6fa3fa0278a05 (diff)
downloaddokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.gz
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.tar.bz2
dokka-f5b7797255576e5f1c230e2ca3fcb5f4e602387c.zip
Code cleanups (#2165)
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r--plugins/base/src/test/kotlin/utils/TestUtils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/base/src/test/kotlin/utils/TestUtils.kt b/plugins/base/src/test/kotlin/utils/TestUtils.kt
index a0528acd..99082110 100644
--- a/plugins/base/src/test/kotlin/utils/TestUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/TestUtils.kt
@@ -24,7 +24,7 @@ abstract class ModelDSL : BaseAbstractTest() {
interface AssertDSL {
infix fun Any?.equals(other: Any?) = assertEquals(other, this)
infix fun Collection<Any>?.allEquals(other: Any?) =
- this?.also { c -> c.forEach { it equals other } } ?: run { assert(false) { "Collection is empty" } }
+ this?.onEach { it equals other } ?: run { assert(false) { "Collection is empty" } }
infix fun <T> Collection<T>?.exists(e: T) {
assertTrue(this.orEmpty().isNotEmpty(), "Collection cannot be null or empty")
assertTrue(this!!.any{it == e}, "Collection doesn't contain $e")