85827b4880
This patch copies Kotlin/JVM stdlib tests (libraries/stdlib/test) excepting ones with explicit java dependencies. It also transforms the tests to use them as box-tests.
16 lines
347 B
Kotlin
16 lines
347 B
Kotlin
import kotlin.text.*
|
|
|
|
import kotlin.test.*
|
|
|
|
|
|
fun box() {
|
|
val regex = "(\\d)(\\w)".toRegex()
|
|
|
|
assertNull(regex.matchEntire("1a 2b"))
|
|
assertNotNull(regex.matchEntire("3c")) { m ->
|
|
assertEquals("3c", m.value)
|
|
assertEquals(3, m.groups.size)
|
|
assertEquals(listOf("3c", "3", "c"), m.groups.map { it!!.value })
|
|
}
|
|
}
|