From 0bc74967b54434a1a088e8f25a71ab9a9507084a Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Mon, 17 Jul 2023 10:54:18 +0300 Subject: [PATCH] Rename testThrowsCME to testIteratorThrowsCME in tests --- .../collections/ConcurrentModificationTest.kt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libraries/stdlib/test/collections/ConcurrentModificationTest.kt b/libraries/stdlib/test/collections/ConcurrentModificationTest.kt index 58d9619647d..301a0053a57 100644 --- a/libraries/stdlib/test/collections/ConcurrentModificationTest.kt +++ b/libraries/stdlib/test/collections/ConcurrentModificationTest.kt @@ -18,7 +18,7 @@ import kotlin.test.fail class ConcurrentModificationTest { - private fun > testThrowsCME( + private fun > testIteratorThrowsCME( withCollection: WithCollection, createIterator: C.() -> I, collectionOp: CollectionOperation, @@ -50,17 +50,17 @@ class ConcurrentModificationTest { assertTrue(invoked) } - private fun > testThrowsCME( + private fun > testIteratorThrowsCME( withMutableList: WithCollection, listOps: List> ) { for (listOp in listOps) { for (iteratorOp in iteratorOperations()) { - testThrowsCME(withMutableList, { iterator() }, listOp, iteratorOp) + testIteratorThrowsCME(withMutableList, { iterator() }, listOp, iteratorOp) } for (iteratorOp in listIteratorOperations) { - testThrowsCME(withMutableList, { listIterator() }, listOp, iteratorOp) - testThrowsCME(withMutableList, { listIterator(2) }, listOp, iteratorOp) + testIteratorThrowsCME(withMutableList, { listIterator() }, listOp, iteratorOp) + testIteratorThrowsCME(withMutableList, { listIterator(2) }, listOp, iteratorOp) } } } @@ -102,7 +102,7 @@ class ConcurrentModificationTest { } fun testThrowsCME(withMutableList: WithCollection>) { - testThrowsCME(withMutableList, operations) + testIteratorThrowsCME(withMutableList, operations) } // size == capacity @@ -146,7 +146,7 @@ class ConcurrentModificationTest { ) fun testThrowsCME(withArrayList: WithCollection>) { - testThrowsCME(withArrayList, operations) + testIteratorThrowsCME(withArrayList, operations) } // size == capacity @@ -199,7 +199,7 @@ class ConcurrentModificationTest { fun testThrowsCME(withMutableSet: WithCollection>) { for (setOp in operations) { for (iteratorOp in iteratorOperations()) { - testThrowsCME(withMutableSet, { iterator() }, setOp, iteratorOp) + testIteratorThrowsCME(withMutableSet, { iterator() }, setOp, iteratorOp) } } } @@ -268,11 +268,11 @@ class ConcurrentModificationTest { fun testThrowsCME(withMutableMap: WithCollection>) { for (mapOp in operations) { for (iteratorOp in iteratorOperations()) { - testThrowsCME(withMutableMap, { keys.iterator() }, mapOp, iteratorOp) - testThrowsCME(withMutableMap, { values.iterator() }, mapOp, iteratorOp) + testIteratorThrowsCME(withMutableMap, { keys.iterator() }, mapOp, iteratorOp) + testIteratorThrowsCME(withMutableMap, { values.iterator() }, mapOp, iteratorOp) } for (iteratorOp in iteratorOperations>()) { - testThrowsCME(withMutableMap, { entries.iterator() }, mapOp, iteratorOp) + testIteratorThrowsCME(withMutableMap, { entries.iterator() }, mapOp, iteratorOp) } } }