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

map := { 'foo': 'bar' } syntax

This commit is contained in:
Alexander Medvednikov
2019-08-03 09:44:08 +02:00
parent bfddb9a80f
commit a5f5b52204
4 changed files with 71 additions and 2 deletions

View File

@ -60,6 +60,13 @@ fn test_map() {
assert a.m['two'] == 2
}
fn test_map_init() {
m := { 'one': 1, 'two': 2, 'jooo': 'sdf' }
assert m['one'] == 1
assert m['two'] == 2
assert m['three'] == 0
}
fn test_string_map() {
//m := map[string]Fn
}