fix must select

This commit is contained in:
Nathan Marz 2016-05-05 14:59:25 -04:00
parent 3602a08e5d
commit 03f6a12baa
2 changed files with 4 additions and 1 deletions

View file

@ -284,7 +284,8 @@
must
[k]
(select* [this structure next-fn]
(next-fn (get structure k)))
(if (contains? structure k)
(next-fn (get structure k))))
(transform* [this structure next-fn]
(if (contains? structure k)
(assoc structure k (next-fn (get structure k)))

View file

@ -255,6 +255,8 @@
(and (= (s/transform (s/must k1) op m)
(s/transform (s/keypath k1) op m))
(= (s/transform (s/must k2) op m) m)
(= (s/select (s/must k1) m) (s/select (s/keypath k1) m))
(empty? (s/select (s/must k2) m))
))))
(defspec parser-test