backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
inline fun <reified T> copy(c: Collection<T>): Array<T> {
|
||||
return c.toTypedArray()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a: Array<String> = copy(listOf("a", "b", "c"))
|
||||
assertEquals("abc", a.joinToString(""))
|
||||
|
||||
val b: Array<Int> = copy(listOf(1,2,3))
|
||||
assertEquals("123", b.map { it.toString() }.joinToString(""))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user