v2 / vlib / v / tests / multiret_with_maps_test.v
32 lines · 31 sloc · 353 bytes · 02e4aa0f0e675af27c66c15da30925fd5026f863
Raw
1fn many_maps() (map[int]int, map[int]int, map[int]int) {
2 return {
3 1: 2
4 }, {
5 3: 4
6 }, {
7 5: 1000
8 }
9}
10
11fn test_fn_returning_many_maps_at_the_same_time() {
12 mut a, mut b, mut c := {
13 0: 0
14 }, {
15 0: 0
16 }, {
17 0: 0
18 }
19 a, b, c = many_maps()
20 dump(a)
21 dump(b)
22 dump(c)
23 assert a == {
24 1: 2
25 }
26 assert b == {
27 3: 4
28 }
29 assert c == {
30 5: 1000
31 }
32}
33