Refactor Map-InternalMap to provide specialized linked string map and set

This commit is contained in:
Ilya Gorbunov
2016-08-26 22:25:56 +03:00
parent e342593d2e
commit 23d2654afd
9 changed files with 67 additions and 32 deletions
+12
View File
@@ -72,6 +72,18 @@ class LinkedHashSetJsTest : SetJsTest() {
}
}
class LinkedPrimitiveSetJsTest : SetJsTest() {
override fun createEmptyMutableSet(): MutableSet<String> = linkedStringSetOf()
override fun createEmptyMutableSetWithNullableValues(): MutableSet<String?> = LinkedHashSet()
@Test
override fun constructors() {
val orderedData = data.toList()
val set = linkedStringSetOf(*orderedData.toTypedArray())
assertEquals(orderedData, set.toList())
}
}
abstract class SetJsTest {
val data: Set<String> = createTestMutableSet()
val empty: Set<String> = createEmptyMutableSet()