From 8210ca958ffb65c8d8c22b445d4417bc56402b8d Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 11:51:41 +0400 Subject: [PATCH 1/9] 204: Add test from issue 198 --- .../src/contract/map/PersistentHashMapTest.kt | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/core/commonTest/src/contract/map/PersistentHashMapTest.kt b/core/commonTest/src/contract/map/PersistentHashMapTest.kt index c1152f4a..028ad859 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapTest.kt @@ -6,7 +6,9 @@ package tests.contract.map import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap +import kotlinx.collections.immutable.minus import kotlinx.collections.immutable.persistentHashMapOf +import kotlinx.collections.immutable.persistentMapOf import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -32,4 +34,43 @@ class PersistentHashMapTest { assertEquals(map3, map4.toMap()) assertEquals(map3, map4) } + + /** + * Test from issue: https://github.com/Kotlin/kotlinx.collections.immutable/issues/198 + */ + @Test + fun `if the full collision is of size 3 and 2 of the keys is removed the remaining key must be promoted`() { + class ChosenHashCode( + private val hashCode: Int, + private val name: String, + ) { + override fun equals(other: Any?): Boolean { + return other is ChosenHashCode && (other.name == name) + } + + override fun hashCode(): Int { + return hashCode + } + + override fun toString(): String { + return name + } + } + + val a = ChosenHashCode(123, "A") + val b = ChosenHashCode(123, "B") + val c = ChosenHashCode(123, "C") + + val abc = persistentMapOf( + a to "x", + b to "y", + c to "z", + ) + + val minusAb = abc.minus(arrayOf(a, b)) + val cOnly = persistentMapOf(c to "z") + + assertEquals(minusAb.entries, cOnly.entries) + assertEquals(minusAb, cOnly) + } } \ No newline at end of file From 58d042a523d1f2b93ca59a881c9fc687d3fcfbf3 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 11:54:24 +0400 Subject: [PATCH 2/9] 204: Move test from issue 198 to PersistentOrderedMapTest --- .../src/contract/map/PersistentHashMapTest.kt | 41 -------------- .../contract/map/PersistentOrderedMapTest.kt | 53 +++++++++++++++++++ 2 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 core/commonTest/src/contract/map/PersistentOrderedMapTest.kt diff --git a/core/commonTest/src/contract/map/PersistentHashMapTest.kt b/core/commonTest/src/contract/map/PersistentHashMapTest.kt index 028ad859..c1152f4a 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapTest.kt @@ -6,9 +6,7 @@ package tests.contract.map import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap -import kotlinx.collections.immutable.minus import kotlinx.collections.immutable.persistentHashMapOf -import kotlinx.collections.immutable.persistentMapOf import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -34,43 +32,4 @@ class PersistentHashMapTest { assertEquals(map3, map4.toMap()) assertEquals(map3, map4) } - - /** - * Test from issue: https://github.com/Kotlin/kotlinx.collections.immutable/issues/198 - */ - @Test - fun `if the full collision is of size 3 and 2 of the keys is removed the remaining key must be promoted`() { - class ChosenHashCode( - private val hashCode: Int, - private val name: String, - ) { - override fun equals(other: Any?): Boolean { - return other is ChosenHashCode && (other.name == name) - } - - override fun hashCode(): Int { - return hashCode - } - - override fun toString(): String { - return name - } - } - - val a = ChosenHashCode(123, "A") - val b = ChosenHashCode(123, "B") - val c = ChosenHashCode(123, "C") - - val abc = persistentMapOf( - a to "x", - b to "y", - c to "z", - ) - - val minusAb = abc.minus(arrayOf(a, b)) - val cOnly = persistentMapOf(c to "z") - - assertEquals(minusAb.entries, cOnly.entries) - assertEquals(minusAb, cOnly) - } } \ No newline at end of file diff --git a/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt b/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt new file mode 100644 index 00000000..e0d0604f --- /dev/null +++ b/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt @@ -0,0 +1,53 @@ +/* + * Copyright 2016-2025 JetBrains s.r.o. + * Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file. + */ + +package tests.contract.map + +import kotlinx.collections.immutable.minus +import kotlinx.collections.immutable.persistentMapOf +import kotlin.test.Test +import kotlin.test.assertEquals + +class PersistentOrderedMapTest { + + /** + * Test from issue: https://github.com/Kotlin/kotlinx.collections.immutable/issues/198 + */ + @Test + fun `if the full collision is of size 3 and 2 of the keys is removed the remaining key must be promoted`() { + class ChosenHashCode( + private val hashCode: Int, + private val name: String, + ) { + override fun equals(other: Any?): Boolean { + return other is ChosenHashCode && (other.name == name) + } + + override fun hashCode(): Int { + return hashCode + } + + override fun toString(): String { + return name + } + } + + val a = ChosenHashCode(123, "A") + val b = ChosenHashCode(123, "B") + val c = ChosenHashCode(123, "C") + + val abc = persistentMapOf( + a to "x", + b to "y", + c to "z", + ) + + val minusAb = abc.minus(arrayOf(a, b)) + val cOnly = persistentMapOf(c to "z") + + assertEquals(minusAb.entries, cOnly.entries) + assertEquals(minusAb, cOnly) + } +} \ No newline at end of file From 4b84d934b26b3d7992daa5641ec32f8477bc2d88 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 12:07:13 +0400 Subject: [PATCH 3/9] 204: Add `builder should correctly handle multiple element removals` test --- .../src/contract/map/PersistentHashMapTest.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/core/commonTest/src/contract/map/PersistentHashMapTest.kt b/core/commonTest/src/contract/map/PersistentHashMapTest.kt index c1152f4a..74b85bb4 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapTest.kt @@ -7,6 +7,7 @@ package tests.contract.map import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap import kotlinx.collections.immutable.persistentHashMapOf +import tests.stress.IntWrapper import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -32,4 +33,23 @@ class PersistentHashMapTest { assertEquals(map3, map4.toMap()) assertEquals(map3, map4) } + + @Test + fun `builder should correctly handle multiple element removals`() { + val a = IntWrapper(0, 0) + val b = IntWrapper(1, 0) + val c = IntWrapper(2, 0) + + val original: PersistentHashMap = + persistentHashMapOf(a to "a", b to "b", c to "c") as PersistentHashMap + val builder = original.builder() + + val onlyA: PersistentHashMap = + persistentHashMapOf(a to "a") as PersistentHashMap + builder.remove(b) + builder.remove(c) + val removedBC = builder.build() + + assertEquals(onlyA, removedBC) + } } \ No newline at end of file From 8d655fa5bb3eee554b2b55fd46f493c0cfada901 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 13:13:40 +0400 Subject: [PATCH 4/9] 204: Add call updateNodeAtIndex if targetNode === newNode, because in this case we still need to do a promotion if needed --- core/commonMain/src/implementations/immutableMap/TrieNode.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/commonMain/src/implementations/immutableMap/TrieNode.kt b/core/commonMain/src/implementations/immutableMap/TrieNode.kt index e00eaa7a..317296fa 100644 --- a/core/commonMain/src/implementations/immutableMap/TrieNode.kt +++ b/core/commonMain/src/implementations/immutableMap/TrieNode.kt @@ -774,9 +774,7 @@ internal class TrieNode( private fun mutableReplaceNode(targetNode: TrieNode, newNode: TrieNode?, nodeIndex: Int, positionMask: Int, owner: MutabilityOwnership) = when { newNode == null -> mutableRemoveNodeAtIndex(nodeIndex, positionMask, owner) - targetNode !== newNode -> - updateNodeAtIndex(nodeIndex, positionMask, newNode, owner) - else -> this + else -> updateNodeAtIndex(nodeIndex, positionMask, newNode, owner) } fun remove(keyHash: Int, key: K, value: @UnsafeVariance V, shift: Int): TrieNode? { From 02099fe47e81d272a67f12a6af42ae134e2bf958 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 13:47:59 +0400 Subject: [PATCH 5/9] 204: Rename test --- core/commonTest/src/contract/map/PersistentOrderedMapTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt b/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt index e0d0604f..be3a1084 100644 --- a/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentOrderedMapTest.kt @@ -16,7 +16,7 @@ class PersistentOrderedMapTest { * Test from issue: https://github.com/Kotlin/kotlinx.collections.immutable/issues/198 */ @Test - fun `if the full collision is of size 3 and 2 of the keys is removed the remaining key must be promoted`() { + fun `when removing multiple keys with identical hashcodes the remaining key should be correctly promoted`() { class ChosenHashCode( private val hashCode: Int, private val name: String, From 416667de8a088d831c1ab403420ae6ea2137f706 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Tue, 29 Apr 2025 14:28:46 +0400 Subject: [PATCH 6/9] 198: Add `builder should correctly handle multiple element removals in case of partial collision` test --- .../src/contract/map/PersistentHashMapTest.kt | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/core/commonTest/src/contract/map/PersistentHashMapTest.kt b/core/commonTest/src/contract/map/PersistentHashMapTest.kt index 74b85bb4..bab191f5 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapTest.kt @@ -35,21 +35,42 @@ class PersistentHashMapTest { } @Test - fun `builder should correctly handle multiple element removals`() { + fun `builder should correctly handle multiple element removals in case of full collision`() { val a = IntWrapper(0, 0) val b = IntWrapper(1, 0) val c = IntWrapper(2, 0) val original: PersistentHashMap = persistentHashMapOf(a to "a", b to "b", c to "c") as PersistentHashMap - val builder = original.builder() val onlyA: PersistentHashMap = persistentHashMapOf(a to "a") as PersistentHashMap + + val builder = original.builder() builder.remove(b) builder.remove(c) val removedBC = builder.build() assertEquals(onlyA, removedBC) } + + @Test + fun `builder should correctly handle multiple element removals in case of partial collision`() { + val a = IntWrapper(0, 0) + val b = IntWrapper(1, 0) + val c = IntWrapper(2, 0) + val d = IntWrapper(3, 11) + + val original: PersistentHashMap = + persistentHashMapOf(a to "a", b to "b", c to "c", d to "d") as PersistentHashMap + + val afterImmutableRemoving = original.remove(b).remove(c) + + val builder = original.builder() + builder.remove(b) + builder.remove(c) + val afterMutableRemoving = builder.build() + + assertEquals(afterImmutableRemoving, afterMutableRemoving) + } } \ No newline at end of file From debaec09d833fcdffcc6da09cbd025978541d46f Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Wed, 30 Apr 2025 12:30:32 +0400 Subject: [PATCH 7/9] 198: Remove irrelevant assert --- core/commonMain/src/implementations/immutableMap/TrieNode.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/core/commonMain/src/implementations/immutableMap/TrieNode.kt b/core/commonMain/src/implementations/immutableMap/TrieNode.kt index 317296fa..d9fed791 100644 --- a/core/commonMain/src/implementations/immutableMap/TrieNode.kt +++ b/core/commonMain/src/implementations/immutableMap/TrieNode.kt @@ -181,7 +181,6 @@ internal class TrieNode( /** The given [newNode] must not be a part of any persistent map instance. */ private fun updateNodeAtIndex(nodeIndex: Int, positionMask: Int, newNode: TrieNode, owner: MutabilityOwnership? = null): TrieNode { -// assert(buffer[nodeIndex] !== newNode) val newNodeBuffer = newNode.buffer if (newNodeBuffer.size == 2 && newNode.nodeMap == 0) { if (buffer.size == 1) { From f76b6cd0b613c0b6b0fec7d5a85f7bace7b68f00 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Wed, 30 Apr 2025 12:40:15 +0400 Subject: [PATCH 8/9] 198: Remove unused newNode parameter in mutableReplaceNode method --- .../commonMain/src/implementations/immutableMap/TrieNode.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/commonMain/src/implementations/immutableMap/TrieNode.kt b/core/commonMain/src/implementations/immutableMap/TrieNode.kt index d9fed791..fcf68d05 100644 --- a/core/commonMain/src/implementations/immutableMap/TrieNode.kt +++ b/core/commonMain/src/implementations/immutableMap/TrieNode.kt @@ -763,14 +763,14 @@ internal class TrieNode( } else { targetNode.mutableRemove(keyHash, key, shift + LOG_MAX_BRANCHING_FACTOR, mutator) } - return mutableReplaceNode(targetNode, newNode, nodeIndex, keyPositionMask, mutator.ownership) + return mutableReplaceNode(newNode, nodeIndex, keyPositionMask, mutator.ownership) } // key is absent return this } - private fun mutableReplaceNode(targetNode: TrieNode, newNode: TrieNode?, nodeIndex: Int, positionMask: Int, owner: MutabilityOwnership) = when { + private fun mutableReplaceNode(newNode: TrieNode?, nodeIndex: Int, positionMask: Int, owner: MutabilityOwnership) = when { newNode == null -> mutableRemoveNodeAtIndex(nodeIndex, positionMask, owner) else -> updateNodeAtIndex(nodeIndex, positionMask, newNode, owner) @@ -823,7 +823,7 @@ internal class TrieNode( } else { targetNode.mutableRemove(keyHash, key, value, shift + LOG_MAX_BRANCHING_FACTOR, mutator) } - return mutableReplaceNode(targetNode, newNode, nodeIndex, keyPositionMask, mutator.ownership) + return mutableReplaceNode(newNode, nodeIndex, keyPositionMask, mutator.ownership) } // key is absent From 4edc5c457b5cc436352a20f41ea53656d0b5f81b Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Wed, 30 Apr 2025 13:09:44 +0400 Subject: [PATCH 9/9] 198: Move ObjectWrapper and IntWrapper from tests.stress package to test package --- core/commonTest/src/{stress => }/ObjectWrapper.kt | 2 +- core/commonTest/src/contract/map/ImmutableMapTest.kt | 4 ++-- .../src/contract/map/PersistentHashMapBuilderTest.kt | 2 +- core/commonTest/src/contract/map/PersistentHashMapTest.kt | 2 +- core/commonTest/src/contract/set/ImmutableSetTest.kt | 2 +- .../src/contract/set/PersistentHashSetBuilderTest.kt | 2 +- .../commonTest/src/implementations/map/HashMapTrieNodeTest.kt | 2 +- core/commonTest/src/stress/WrapperGenerator.kt | 1 + .../commonTest/src/stress/map/PersistentHashMapBuilderTest.kt | 2 +- core/commonTest/src/stress/map/PersistentHashMapTest.kt | 2 +- .../commonTest/src/stress/set/PersistentHashSetBuilderTest.kt | 2 +- core/commonTest/src/stress/set/PersistentHashSetTest.kt | 2 +- 12 files changed, 13 insertions(+), 12 deletions(-) rename core/commonTest/src/{stress => }/ObjectWrapper.kt (97%) diff --git a/core/commonTest/src/stress/ObjectWrapper.kt b/core/commonTest/src/ObjectWrapper.kt similarity index 97% rename from core/commonTest/src/stress/ObjectWrapper.kt rename to core/commonTest/src/ObjectWrapper.kt index c217de6a..19f5c7ca 100644 --- a/core/commonTest/src/stress/ObjectWrapper.kt +++ b/core/commonTest/src/ObjectWrapper.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file. */ -package tests.stress +package tests import kotlinx.collections.immutable.internal.assert import kotlin.js.JsName diff --git a/core/commonTest/src/contract/map/ImmutableMapTest.kt b/core/commonTest/src/contract/map/ImmutableMapTest.kt index 599f2c1c..d204d443 100644 --- a/core/commonTest/src/contract/map/ImmutableMapTest.kt +++ b/core/commonTest/src/contract/map/ImmutableMapTest.kt @@ -11,8 +11,8 @@ import tests.contract.compare import tests.contract.mapBehavior import tests.contract.setBehavior import tests.remove -import tests.stress.IntWrapper -import tests.stress.ObjectWrapper +import tests.IntWrapper +import tests.ObjectWrapper import kotlin.test.* class ImmutableHashMapTest : ImmutableMapTest() { diff --git a/core/commonTest/src/contract/map/PersistentHashMapBuilderTest.kt b/core/commonTest/src/contract/map/PersistentHashMapBuilderTest.kt index 732eb81a..a4d47a7c 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapBuilderTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapBuilderTest.kt @@ -7,7 +7,7 @@ package tests.contract.map import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap import kotlinx.collections.immutable.persistentHashMapOf -import tests.stress.IntWrapper +import tests.IntWrapper import kotlin.collections.iterator import kotlin.test.Test import kotlin.test.assertEquals diff --git a/core/commonTest/src/contract/map/PersistentHashMapTest.kt b/core/commonTest/src/contract/map/PersistentHashMapTest.kt index bab191f5..f7f43029 100644 --- a/core/commonTest/src/contract/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/contract/map/PersistentHashMapTest.kt @@ -7,7 +7,7 @@ package tests.contract.map import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap import kotlinx.collections.immutable.persistentHashMapOf -import tests.stress.IntWrapper +import tests.IntWrapper import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/core/commonTest/src/contract/set/ImmutableSetTest.kt b/core/commonTest/src/contract/set/ImmutableSetTest.kt index f017ccae..1339ebcf 100644 --- a/core/commonTest/src/contract/set/ImmutableSetTest.kt +++ b/core/commonTest/src/contract/set/ImmutableSetTest.kt @@ -10,7 +10,7 @@ import tests.contract.compare import tests.contract.setBehavior import tests.isDigit import tests.isUpperCase -import tests.stress.IntWrapper +import tests.IntWrapper import kotlin.test.* class ImmutableHashSetTest : ImmutableSetTestBase() { diff --git a/core/commonTest/src/contract/set/PersistentHashSetBuilderTest.kt b/core/commonTest/src/contract/set/PersistentHashSetBuilderTest.kt index df1df86a..6a81ffd5 100644 --- a/core/commonTest/src/contract/set/PersistentHashSetBuilderTest.kt +++ b/core/commonTest/src/contract/set/PersistentHashSetBuilderTest.kt @@ -7,7 +7,7 @@ package tests.contract.set import kotlinx.collections.immutable.implementations.immutableSet.PersistentHashSet import kotlinx.collections.immutable.persistentHashSetOf -import tests.stress.IntWrapper +import tests.IntWrapper import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/core/commonTest/src/implementations/map/HashMapTrieNodeTest.kt b/core/commonTest/src/implementations/map/HashMapTrieNodeTest.kt index f3e4ef5d..822d3707 100644 --- a/core/commonTest/src/implementations/map/HashMapTrieNodeTest.kt +++ b/core/commonTest/src/implementations/map/HashMapTrieNodeTest.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.implementations.immutableMap.LOG_MAX_BRANCH import kotlinx.collections.immutable.implementations.immutableMap.MAX_SHIFT import kotlinx.collections.immutable.implementations.immutableMap.PersistentHashMap import kotlinx.collections.immutable.implementations.immutableMap.TrieNode -import tests.stress.IntWrapper +import tests.IntWrapper import kotlin.test.* class HashMapTrieNodeTest { diff --git a/core/commonTest/src/stress/WrapperGenerator.kt b/core/commonTest/src/stress/WrapperGenerator.kt index 377e1762..4e17e189 100644 --- a/core/commonTest/src/stress/WrapperGenerator.kt +++ b/core/commonTest/src/stress/WrapperGenerator.kt @@ -5,6 +5,7 @@ package tests.stress +import tests.ObjectWrapper import kotlin.random.Random diff --git a/core/commonTest/src/stress/map/PersistentHashMapBuilderTest.kt b/core/commonTest/src/stress/map/PersistentHashMapBuilderTest.kt index deb20e4b..4f51852a 100644 --- a/core/commonTest/src/stress/map/PersistentHashMapBuilderTest.kt +++ b/core/commonTest/src/stress/map/PersistentHashMapBuilderTest.kt @@ -11,7 +11,7 @@ import tests.NForAlgorithmComplexity import tests.distinctStringValues import tests.remove import tests.stress.ExecutionTimeMeasuringTest -import tests.stress.IntWrapper +import tests.IntWrapper import tests.stress.WrapperGenerator import kotlin.random.Random import kotlin.test.* diff --git a/core/commonTest/src/stress/map/PersistentHashMapTest.kt b/core/commonTest/src/stress/map/PersistentHashMapTest.kt index 6eb0c08a..dbd9772d 100644 --- a/core/commonTest/src/stress/map/PersistentHashMapTest.kt +++ b/core/commonTest/src/stress/map/PersistentHashMapTest.kt @@ -11,7 +11,7 @@ import tests.NForAlgorithmComplexity import tests.distinctStringValues import tests.remove import tests.stress.ExecutionTimeMeasuringTest -import tests.stress.IntWrapper +import tests.IntWrapper import tests.stress.WrapperGenerator import kotlin.random.Random import kotlin.test.* diff --git a/core/commonTest/src/stress/set/PersistentHashSetBuilderTest.kt b/core/commonTest/src/stress/set/PersistentHashSetBuilderTest.kt index 3978b88d..1f84b190 100644 --- a/core/commonTest/src/stress/set/PersistentHashSetBuilderTest.kt +++ b/core/commonTest/src/stress/set/PersistentHashSetBuilderTest.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.persistentHashSetOf import tests.NForAlgorithmComplexity import tests.distinctStringValues import tests.stress.ExecutionTimeMeasuringTest -import tests.stress.IntWrapper +import tests.IntWrapper import tests.stress.WrapperGenerator import kotlin.random.Random import kotlin.test.Test diff --git a/core/commonTest/src/stress/set/PersistentHashSetTest.kt b/core/commonTest/src/stress/set/PersistentHashSetTest.kt index e37a31d5..8fa14126 100644 --- a/core/commonTest/src/stress/set/PersistentHashSetTest.kt +++ b/core/commonTest/src/stress/set/PersistentHashSetTest.kt @@ -9,7 +9,7 @@ import kotlinx.collections.immutable.persistentHashSetOf import tests.NForAlgorithmComplexity import tests.distinctStringValues import tests.stress.ExecutionTimeMeasuringTest -import tests.stress.IntWrapper +import tests.IntWrapper import tests.stress.WrapperGenerator import kotlin.random.Random import kotlin.test.Test