Kotlin test optional enum (#6201)

* Add test for optional enums in Kotlin

* Rename optional_scalars2.fbs into optional_scalars.fbs

Also updated all references in the project to point to
"optional_scalars.fbs" instead of "optional_scalars2.fbs".
This commit is contained in:
Paulo Pinheiro
2020-10-22 22:36:02 +02:00
committed by GitHub
parent fe8e3c7e5d
commit 1606fb6375
18 changed files with 86 additions and 106 deletions

View File

@@ -8,7 +8,8 @@ class OptionalByte private constructor() {
companion object {
const val None: Byte = 0
const val One: Byte = 1
val names : Array<String> = arrayOf("None", "One")
const val Two: Byte = 2
val names : Array<String> = arrayOf("None", "One", "Two")
fun name(e: Int) : String = names[e]
}
}