Two test for checking Meta.enum extension.
Test `testEnum` failed.
This commit is contained in:
parent
1b118986f5
commit
e68e184fb2
@ -0,0 +1,22 @@
|
||||
package hep.dataforge.meta
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class MetaExtensionTest {
|
||||
|
||||
enum class TestEnum{
|
||||
test
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEnum(){
|
||||
val meta = buildMeta{"enum" to TestEnum.test}
|
||||
meta["enum"].enum<TestEnum>()
|
||||
}
|
||||
@Test
|
||||
fun testEnumByString(){
|
||||
val meta = buildMeta{"enum" to TestEnum.test.toString()}
|
||||
println(meta["enum"].enum<TestEnum>())
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user