Created
June 15, 2011 17:22
-
-
Save amalloy/1027587 to your computer and use it in GitHub Desktop.
weird clojure.test behavior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; With this code | |
(is (every? #{1} (apply-redis-instructions! instrs))) | |
(is (every? #{1} '(1 1 1))) | |
;; I get this single failure: | |
expected: (every? #{1} (apply-redis-instructions! instrs)) | |
actual: (not (every? #{1} (1 1))) | |
;; With this code, I get no failures | |
(is (every? #(= % 1) (apply-redis-instructions! instrs))) | |
(is (every? #(= % 1) '(1 1 1))) | |
;; Shouldn't #(= % 1) and #{1} be equivalent as predicates for every? | |
;; and '(1 1 1) should be equivalent to the lazy seq returned by my | |
;; redis function anyway, no? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment