Add init test.
This commit is contained in:
@@ -676,3 +676,9 @@ task initializers0(type: RunKonanTest) {
|
||||
source = "runtime/basic/initializers0.kt"
|
||||
}
|
||||
|
||||
task initializers1(type: RunKonanTest) {
|
||||
goldValue = "Init Test\n" +
|
||||
"Done\n"
|
||||
disabled = true
|
||||
source = "runtime/basic/initializers1.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
companion object {
|
||||
init {
|
||||
println("Init Test")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
val t1 = Test()
|
||||
val t2 = Test()
|
||||
println("Done")
|
||||
}
|
||||
Reference in New Issue
Block a user