From 78c901bdf4b82a9b230144e4f1533ca3141acc34 Mon Sep 17 00:00:00 2001 From: Kevin Galligan Date: Mon, 19 Aug 2024 12:22:15 -0400 Subject: [PATCH] Fix build --- .../touchlab/stately/collections/SharedHashMapTest.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deprecated/stately-collections/src/commonTest/kotlin/co/touchlab/stately/collections/SharedHashMapTest.kt b/deprecated/stately-collections/src/commonTest/kotlin/co/touchlab/stately/collections/SharedHashMapTest.kt index 648b740..a6b7838 100644 --- a/deprecated/stately-collections/src/commonTest/kotlin/co/touchlab/stately/collections/SharedHashMapTest.kt +++ b/deprecated/stately-collections/src/commonTest/kotlin/co/touchlab/stately/collections/SharedHashMapTest.kt @@ -143,11 +143,12 @@ class SharedHashMapTest { @Test fun mtAddRemove() { - val m: SharedHashMaptry { + try { + println("mtAddRemove Start") val LOOPS = 1_000 val ops = ThreadOperations { SharedHashMap() } val removeOps = ThreadOperations { SharedHashMap() } - m = SharedHashMap() + val m = SharedHashMap() for (i in 0 until LOOPS) { val key = "key $i" val value = "val $i" @@ -159,13 +160,14 @@ class SharedHashMapTest { ops.run(threads = 8, randomize = true) removeOps.run(threads = 8, randomize = true) + println("mtAddRemove assert m.size") + assertEquals(0, m.size) } catch (e: Exception) { println("mtAddRemove FAILED") e.printStackTrace() throw e } - println("mtAddRemove assert m.size") - assertEquals(0, m.size) + } /**