Fix deprecared API usages in test

This commit is contained in:
Ilya Gorbunov
2017-01-26 04:30:12 +03:00
parent b0c3c7463b
commit c00d684ece
+1 -1
View File
@@ -4,7 +4,7 @@ fun checkJsNames(base: String, o: Any) {
val regex = Regex("^$base(_[0-9a-zA-Z]+\\\$)?(_[0-9])?$")
val properties = getAllProperties(o).filter { it.startsWith("$base") }
val distinctProperties = properties.mapNotNull { regex.match(it)?.groupValues?.get(1) }.distinct()
val distinctProperties = properties.mapNotNull { regex.find(it)?.groupValues?.get(1) }.distinct()
if (distinctProperties.size != 2) {
fail("Two distinct properties expected, ${properties.size} occurred: " + properties)
}