improve compact test
This commit is contained in:
parent
7b646ca566
commit
b1050b910c
1 changed files with 1 additions and 1 deletions
|
|
@ -1668,7 +1668,7 @@
|
|||
(is (= {} (setval [:a (s/compact :b :c)] s/NONE {:a {:b {:c 1}}})))
|
||||
(is (= {:a {:d 2}} (setval [:a (s/compact :b :c)] s/NONE {:a {:b {:c 1} :d 2}})))
|
||||
(let [TREE-VALUES (recursive-path [] p (s/if-path vector? [(s/compact s/ALL) p] s/STAY))
|
||||
tree [1 [2 3] [4 [[5] [[6]]]]]]
|
||||
tree [1 [2 3] [] [4 [[5] [[6]]]]]]
|
||||
(is (= [2 4 6] (select [TREE-VALUES even?] tree)))
|
||||
(is (= [1 [3] [[[5]]]] (setval [TREE-VALUES even?] s/NONE tree)))
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue