diff options
Diffstat (limited to 'v_windows/v/old/vlib/v/tests/map_equality_test.v')
-rw-r--r-- | v_windows/v/old/vlib/v/tests/map_equality_test.v | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/tests/map_equality_test.v b/v_windows/v/old/vlib/v/tests/map_equality_test.v new file mode 100644 index 0000000..d0864f2 --- /dev/null +++ b/v_windows/v/old/vlib/v/tests/map_equality_test.v @@ -0,0 +1,38 @@ +fn test_map_equality() { + a1 := map{ + 'a': 1 + 'b': 2 + } + b1 := map{ + 'b': 2 + 'a': 1 + } + c1 := map{ + 'a': 2 + 'b': 1 + } + + assert a1 == b1 + assert a1 != c1 + + a2 := map{ + 'a': 1 + } + b2 := map{ + 'a': 1 + 'b': 2 + } + + assert a2 != b2 + + a3 := map{ + 'a': '1' + 'b': '2' + } + b3 := map{ + 'b': '2' + 'a': '1' + } + + assert a3 == b3 +} |