Wilker <wilkerlu...@gmail.com> writes: > My problem is, I wanna do somekind of loop and test each entry on > test-data, all in one, I tried some (for) loops but it made the test > run no assertion at all... This is my (for) trial (don't works): > > (deftest test-compute-hash > (for [{:keys [path hash]} (vals subdb-test-data)] > (is (= hash (subdb-hash path)) "hash don't match"))) > > How I can make this works? I will need to create a macro for that (I hope > not...)?
`for' is lazy. It computes its result seq not before you access its elements. You want to iterate over the entries of your map only for side-effects (the `is' test). In that case, use `doseq'. Bye, Tassilo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en