Added a test for members of EnumEntry in a library.
This commit is contained in:
committed by
alexander-gorshenev
parent
d13b350716
commit
a816de4865
@@ -0,0 +1,30 @@
|
||||
// WITH_RUNTIME
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
enum class Foo {
|
||||
FOO() {
|
||||
override fun foo() = "foo"
|
||||
|
||||
override var xxx: String
|
||||
get() = "xxx"
|
||||
set(value: String) {
|
||||
}
|
||||
};
|
||||
|
||||
abstract fun foo(): String
|
||||
abstract var xxx: String
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(Foo.FOO.foo(), "foo")
|
||||
Foo.FOO.xxx = "zzzz"
|
||||
assertEquals(Foo.FOO.xxx, "xxx")
|
||||
assertEquals(Foo.FOO.toString(), "FOO")
|
||||
assertEquals(Foo.valueOf("FOO").toString(), "FOO")
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user