提交 4c09af0a 编写于 作者: J James Strachan

added test case for KT-1773

上级 b4ad820e
......@@ -111,4 +111,29 @@ class MapTest {
println("Got new map $m2")
assertEquals(arrayList("beer2", "Mells2"), m2.values().toList())
}
/**
TODO
test case for http://youtrack.jetbrains.com/issue/KT-1773
*/
test fun compilerBug() {
val map = TreeMap<String, String>()
map["beverage"] = "beer"
map["location"] = "Mells"
map["name"] = "James"
var list = arrayList<String>()
for (e in map) {
println("key = ${e.getKey()}, value = ${e.getValue()}")
list += e.getKey()
list += e.getValue()
}
assertEquals(6, list.size())
assertEquals("beverage,beer,location,Mells,name,James", list.makeString(","))
println("==== worked! $list")
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册