Skip to content

Commit 2e533cd

Browse files
committed
feat(dict): adding usertype as key test in dict-tests
1 parent 29d8856 commit 2e533cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/dict-tests.ark

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"b" 2
1818
"c" 3))
1919
(let d3 (dict [1] 2))
20+
(let d4 (dict (async foo) 1))
2021
(let empty (dict))
2122
(let map_to_num (fun (k v) (toNumber v)))
2223
(let map_to_str (fun (k v) (toString v)))
@@ -32,7 +33,8 @@
3233
(test:eq d2 (dict "c" 3 "a" 1 "b" 2))
3334
(test:neq d2 (dict "c" 4 "a" 1 "b" 2))
3435
(test:neq d d3)
35-
(test:neq d3 d2) })
36+
(test:neq d3 d2)
37+
(test:neq d3 d4) })
3638

3739
(test:case "get" {
3840
(test:eq (dict:get d "key") "value")
@@ -55,7 +57,9 @@
5557

5658
(test:case "size" {
5759
(test:eq (dict:size d) 6)
58-
(test:eq (dict:size (dict)) 0) })
60+
(test:eq (dict:size (dict)) 0)
61+
(test:eq (dict:size d3) 1)
62+
(test:eq (dict:size d4) 1) })
5963

6064
(test:case "keys" {
6165
(test:eq (dict:keys d) ["key" 5 true false foo closure])

0 commit comments

Comments
 (0)