Vsevolod Tolstopyatov | 9619134 | 2018-04-20 18:13:33 +0300 | [diff] [blame] | 1 | package kotlinx.coroutines.experimental.internal |
2 | |||||
3 | import kotlin.test.* | ||||
4 | |||||
5 | class ArrayCopyTest { | ||||
6 | |||||
7 | @Test | ||||
8 | fun testArrayCopy() { | ||||
9 | val source = Array(10, { it }) | ||||
10 | val destination = arrayOfNulls<Int>(7) | ||||
11 | arraycopy(source, 2, destination, 1, 5) | ||||
12 | assertEquals(listOf(null, 2, 3, 4, 5, 6, null), destination.toList()) | ||||
13 | } | ||||
14 | } |