Cleanup in libraries

This commit is contained in:
Ilya Gorbunov
2015-12-29 19:21:39 +03:00
parent 92c2d17910
commit 19a4f65fd1
15 changed files with 32 additions and 44 deletions
@@ -43,7 +43,7 @@ class MapJVMTest {
}
@test fun iterateAndRemove() {
val map = (1..5).toMap({ it }, { 'a' + it }).toLinkedMap()
val map = (1..5).toMapBy({ it }, { 'a' + it }).toLinkedMap()
val iterator = map.iterator()
while (iterator.hasNext()) {
if (iterator.next().key % 2 == 0)
+1 -1
View File
@@ -187,7 +187,7 @@ class MapTest {
}
@test fun createWithSelectorForKeyAndValue() {
val map = listOf("a", "bb", "ccc").toMap({ it.length }, { it.toUpperCase() })
val map = listOf("a", "bb", "ccc").toMapBy({ it.length }, { it.toUpperCase() })
assertEquals(3, map.size)
assertEquals("A", map[1])
assertEquals("BB", map[2])