We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29d8856 commit 2e533cdCopy full SHA for 2e533cd
1 file changed
tests/dict-tests.ark
@@ -17,6 +17,7 @@
17
"b" 2
18
"c" 3))
19
(let d3 (dict [1] 2))
20
+ (let d4 (dict (async foo) 1))
21
(let empty (dict))
22
(let map_to_num (fun (k v) (toNumber v)))
23
(let map_to_str (fun (k v) (toString v)))
@@ -32,7 +33,8 @@
32
33
(test:eq d2 (dict "c" 3 "a" 1 "b" 2))
34
(test:neq d2 (dict "c" 4 "a" 1 "b" 2))
35
(test:neq d d3)
- (test:neq d3 d2) })
36
+ (test:neq d3 d2)
37
+ (test:neq d3 d4) })
38
39
(test:case "get" {
40
(test:eq (dict:get d "key") "value")
@@ -55,7 +57,9 @@
55
57
56
58
(test:case "size" {
59
(test:eq (dict:size d) 6)
- (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) })
63
64
(test:case "keys" {
65
(test:eq (dict:keys d) ["key" 5 true false foo closure])
0 commit comments