aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/tests/map_equality_test.v
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/vlib/v/tests/map_equality_test.v')
-rw-r--r--v_windows/v/vlib/v/tests/map_equality_test.v38
1 files changed, 38 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/map_equality_test.v b/v_windows/v/vlib/v/tests/map_equality_test.v
new file mode 100644
index 0000000..713b966
--- /dev/null
+++ b/v_windows/v/vlib/v/tests/map_equality_test.v
@@ -0,0 +1,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
+}