Cleanup tests, specify type where it's ambiguous.

This commit is contained in:
Ilya Gorbunov
2015-10-22 16:44:12 +03:00
parent 0b74698c16
commit 579ce8091c
3 changed files with 12 additions and 11 deletions
+7 -6
View File
@@ -14,9 +14,10 @@ class ComplexMapJsTest : MapJsTest() {
HashMap<K, Int>(3, 0.5f)
val map = HashMap<K, Int>(createTestMap() as HashMap<K, Int>)
assertEquals(KEYS.toNormalizedList(), map.keySet().toNormalizedList())
assertEquals(VALUES.toNormalizedList(), map.values().toNormalizedList())
assertEquals(KEYS.toNormalizedList(), map.keys.toNormalizedList() as List<Any>)
assertEquals(VALUES.toNormalizedList(), map.values.toNormalizedList())
}
@test override fun constructors() {
doTest<String>()
}
@@ -35,8 +36,8 @@ class PrimitiveMapJsTest : MapJsTest() {
val map = HashMap<String, Int>(createTestMap())
assertEquals(KEYS.toNormalizedList(), map.keySet().toNormalizedList())
assertEquals(VALUES.toNormalizedList(), map.values().toNormalizedList())
assertEquals(KEYS.toNormalizedList(), map.keys.toNormalizedList())
assertEquals(VALUES.toNormalizedList(), map.values.toNormalizedList())
}
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.sorted()
@@ -62,8 +63,8 @@ class LinkedHashMapTest : MapJsTest() {
val map = LinkedHashMap<String, Int>(createTestMap())
assertEquals(KEYS.toNormalizedList(), map.keySet().toNormalizedList())
assertEquals(VALUES.toNormalizedList(), map.values().toNormalizedList())
assertEquals(KEYS.toNormalizedList(), map.keys.toNormalizedList())
assertEquals(VALUES.toNormalizedList(), map.values.toNormalizedList())
}
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.toList()