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:
+21
@@ -0,0 +1,21 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
class A {
|
||||
private lateinit var str: String
|
||||
|
||||
public fun getMyStr(): String {
|
||||
try {
|
||||
val a = str
|
||||
} catch (e: RuntimeException) {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
return "FAIL"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
return a.getMyStr()
|
||||
}
|
||||
Reference in New Issue
Block a user