We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a6b4cb commit 29d8856Copy full SHA for 29d8856
tests/dict-tests.ark
@@ -16,19 +16,23 @@
16
"a" 1
17
"b" 2
18
"c" 3))
19
+ (let d3 (dict [1] 2))
20
(let empty (dict))
21
(let map_to_num (fun (k v) (toNumber v)))
22
(let map_to_str (fun (k v) (toString v)))
23
(let filter_str_keys (fun (k v) (= "String" (type k))))
24
(let filter_odd (fun (k v) (= 1 (mod v 2))))
25
26
+
27
(test:case "comparison" {
28
(test:eq empty (dict))
29
(test:eq (dict) (dict))
30
(test:neq empty d)
31
(test:neq d d2)
32
(test:eq d2 (dict "c" 3 "a" 1 "b" 2))
- (test:neq d2 (dict "c" 4 "a" 1 "b" 2)) })
33
+ (test:neq d2 (dict "c" 4 "a" 1 "b" 2))
34
+ (test:neq d d3)
35
+ (test:neq d3 d2) })
36
37
(test:case "get" {
38
(test:eq (dict:get d "key") "value")
0 commit comments