From 1cff7aad9259aac10275fdede354aaab7f87bf82 Mon Sep 17 00:00:00 2001 From: Daniel Voko <15357860+vokod@users.noreply.github.com> Date: Wed, 31 Jul 2024 08:40:03 +0200 Subject: [PATCH] fix effect comparison in unit tests if number of effects is one --- buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../com/bridge/ouroboros/compose/test/EffectMatching.kt | 4 ++-- .../com/bridge/ouroboros/compose/test/TestExtensions.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt b/buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt index 415a56e..6d22046 100644 --- a/buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt +++ b/buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt @@ -1,7 +1,7 @@ package com.ouroboros object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:8.4.1" + const val androidGradlePlugin = "com.android.tools.build:gradle:8.5.0" const val junit = "junit:junit:4.13" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7b08c86..010bd43 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ -#Thu May 16 14:29:48 CEST 2024 +#Wed Jul 31 08:39:04 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/test/src/main/kotlin/com/bridge/ouroboros/compose/test/EffectMatching.kt b/test/src/main/kotlin/com/bridge/ouroboros/compose/test/EffectMatching.kt index e6ddddd..dd9f52d 100644 --- a/test/src/main/kotlin/com/bridge/ouroboros/compose/test/EffectMatching.kt +++ b/test/src/main/kotlin/com/bridge/ouroboros/compose/test/EffectMatching.kt @@ -4,7 +4,7 @@ import kotlin.test.junit.JUnitAsserter.assertEquals import kotlin.test.junit.JUnitAsserter.assertTrue class EffectMatching( - capturedEvents: Set + capturedEvents: Set, ) { private var eventsAccessed = false @@ -15,7 +15,7 @@ class EffectMatching( } fun expectEvents(vararg events: E) { - assertEquals("Expected events to be $events", events.toSet(), emittedEvents) + assertEquals("Expected events to be $events", events.toSet(), emittedEvents.toSet()) } fun expectNoEvents() { diff --git a/test/src/main/kotlin/com/bridge/ouroboros/compose/test/TestExtensions.kt b/test/src/main/kotlin/com/bridge/ouroboros/compose/test/TestExtensions.kt index fecf52e..13a6e22 100644 --- a/test/src/main/kotlin/com/bridge/ouroboros/compose/test/TestExtensions.kt +++ b/test/src/main/kotlin/com/bridge/ouroboros/compose/test/TestExtensions.kt @@ -21,7 +21,7 @@ infix fun , E, S> F.runWith(state: S): EffectResult, E, S> F.runWith( state: S, - context: CoroutineContext + context: CoroutineContext, ): EffectResult { val eventConsumer = TestConsumer()