From 94bd8f73510edd53cf01b468f6de15919b3ce0e5 Mon Sep 17 00:00:00 2001 From: aSemy <897017+aSemy@users.noreply.github.com> Date: Sun, 23 Oct 2022 23:53:10 +0200 Subject: [PATCH] add infix to shouldHaveSameHashCodeAs --- .../src/commonMain/kotlin/io/kotest/matchers/types/hash.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotest-assertions/kotest-assertions-core/src/commonMain/kotlin/io/kotest/matchers/types/hash.kt b/kotest-assertions/kotest-assertions-core/src/commonMain/kotlin/io/kotest/matchers/types/hash.kt index 15f8a8e727b..9dfd02baf81 100644 --- a/kotest-assertions/kotest-assertions-core/src/commonMain/kotlin/io/kotest/matchers/types/hash.kt +++ b/kotest-assertions/kotest-assertions-core/src/commonMain/kotlin/io/kotest/matchers/types/hash.kt @@ -5,8 +5,8 @@ import io.kotest.matchers.MatcherResult import io.kotest.matchers.should import io.kotest.matchers.shouldNot -fun Any.shouldHaveSameHashCodeAs(other: Any) = this should haveSameHashCodeAs(other) -fun Any.shouldNotHaveSameHashCodeAs(other: Any) = this shouldNot haveSameHashCodeAs(other) +infix fun Any.shouldHaveSameHashCodeAs(other: Any) = this should haveSameHashCodeAs(other) +infix fun Any.shouldNotHaveSameHashCodeAs(other: Any) = this shouldNot haveSameHashCodeAs(other) fun haveSameHashCodeAs(other: Any) = object : Matcher { override fun test(value: Any): MatcherResult {