File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
core/commonTest/src/implementations/immutableList Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1616
1717package kotlinx.collections.immutable.implementations.immutableList
1818
19- import org.junit.Test
20- import java.util.*
2119import kotlin.test.*
2220
2321class BufferIteratorTest {
Original file line number Diff line number Diff line change 1616
1717package kotlinx.collections.immutable.implementations.immutableList
1818
19- import org.junit.Test
20- import java.util.*
19+ import kotlinx.collections.immutable.internal.assert
20+ import kotlin.math.pow
2121import kotlin.test.*
2222
2323class TrieIteratorTest {
@@ -41,7 +41,7 @@ class TrieIteratorTest {
4141 val newLeaves = arrayListOf<Any ?>()
4242 for (i in 0 until leaves.size step MAX_BUFFER_SIZE ) {
4343 val buffer = arrayOfNulls<Any ?>(MAX_BUFFER_SIZE )
44- for (j in i until Math .min (leaves.size, i + MAX_BUFFER_SIZE )) {
44+ for (j in i until minOf (leaves.size, i + MAX_BUFFER_SIZE )) {
4545 buffer[j - i] = leaves[j]
4646 }
4747 newLeaves.add(buffer)
@@ -58,7 +58,7 @@ class TrieIteratorTest {
5858 var lastStop = 1
5959 for (height in 1 .. 7 ) {
6060 for (leafCount in lastStop.. (1 shl 12 ) step height) {
61- if (Math .pow( MAX_BUFFER_SIZE .toDouble(), (height - 1 ).toDouble() ) < leafCount) {
61+ if (MAX_BUFFER_SIZE .toDouble().pow (height - 1 ) < leafCount) {
6262 lastStop = leafCount
6363 break
6464 }
You can’t perform that action at this time.
0 commit comments