Fix usages of ArgType.Choice in benchmarks (#4562)
This commit is contained in:
committed by
Stanislav Erokhin
parent
211c160558
commit
e940a1d6bb
@@ -156,11 +156,17 @@ class VideoPlayer(val requestedSize: Dimensions?) : DisposableContainer() {
|
||||
}
|
||||
}
|
||||
|
||||
enum class Mode {
|
||||
VIDEO,
|
||||
AUDIO,
|
||||
BOTH
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val argParser = ArgParser("videoplayer")
|
||||
val mode by argParser.option(
|
||||
ArgType.Choice(listOf("video", "audio", "both")), shortName = "m", description = "Play mode")
|
||||
.default("both")
|
||||
ArgType.Choice<Mode>(), shortName = "m", description = "Play mode")
|
||||
.default(BOTH)
|
||||
val size by argParser.option(ArgType.Int, shortName = "s", description = "Required size of videoplayer window")
|
||||
.delimiter(",")
|
||||
val fileName by argParser.argument(ArgType.String, description = "File to play")
|
||||
|
||||
Reference in New Issue
Block a user