1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

nice enum works

This commit is contained in:
Alexander Medvednikov
2019-10-24 14:56:02 +03:00
parent dca49e43d9
commit 560ae9352c
2 changed files with 7 additions and 1 deletions

View File

@ -22,3 +22,9 @@ fn test_enum() {
color = .green
assert color == Color.green
}
fn test_in() {
color := Color.red
num := 3
assert color in [.red, .green]
}