aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/tests/map_equality_test.v
blob: 713b9666112a0f547d632c22a5a899b618e7db05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
fn test_map_equality() {
	a1 := {
		'a': 1
		'b': 2
	}
	b1 := {
		'b': 2
		'a': 1
	}
	c1 := {
		'a': 2
		'b': 1
	}

	assert a1 == b1
	assert a1 != c1

	a2 := {
		'a': 1
	}
	b2 := {
		'a': 1
		'b': 2
	}

	assert a2 != b2

	a3 := {
		'a': '1'
		'b': '2'
	}
	b3 := {
		'b': '2'
		'a': '1'
	}

	assert a3 == b3
}