v / vlib / json / tests / json_mut_map_test.v
12 lines · 10 sloc · 226 bytes · d2587eb89de78a95d885b2ebc0d320959f995f00
Raw
1import json
2
3fn q_and_a(mut db_json map[string][]string) {
4 x := json.encode(db_json)
5 assert x == '{}'
6}
7
8fn test_main() {
9 mut db_json := json.decode(map[string][]string, '{}')!
10 assert db_json == {}
11 q_and_a(mut db_json)
12}
13