File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 17
17
"b" 2
18
18
"c" 3))
19
19
(let d3 (dict [1] 2))
20
+ (let d4 (dict (async foo) 1))
20
21
(let empty (dict))
21
22
(let map_to_num (fun (k v) (toNumber v)))
22
23
(let map_to_str (fun (k v) (toString v)))
32
33
(test:eq d2 (dict "c" 3 "a" 1 "b" 2))
33
34
(test:neq d2 (dict "c" 4 "a" 1 "b" 2))
34
35
(test:neq d d3)
35
- (test:neq d3 d2) })
36
+ (test:neq d3 d2)
37
+ (test:neq d3 d4) })
36
38
37
39
(test:case "get" {
38
40
(test:eq (dict:get d "key") "value")
55
57
56
58
(test:case "size" {
57
59
(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) })
59
63
60
64
(test:case "keys" {
61
65
(test:eq (dict:keys d) ["key" 5 true false foo closure])
You can’t perform that action at this time.
0 commit comments