mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.parser: add a test for db46ad5
This commit is contained in:
parent
db46ad5481
commit
f7a8a460f6
@ -0,0 +1,10 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
|
fn test_calling_functions_with_map_initializations_containing_arrays() {
|
||||||
|
result := json.encode(map{
|
||||||
|
// NB: []string{} should NOT be treated as []json.string{}
|
||||||
|
'users': []string{}
|
||||||
|
'groups': []string{}
|
||||||
|
})
|
||||||
|
assert result == '{"users":[],"groups":[]}'
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user