summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfogus <mefogus@gmail.com>2010-09-28 10:59:33 -0400
committerStuart Halloway <stu@thinkrelevance.com>2010-10-11 09:21:19 -0400
commit140a9866646d60158da485e6229d3afba01dcb4c (patch)
treeea44d77779cb5206623c66d7e35f6aa1adc9748b
parent73453f2ed5f23e84ba779b7824dd0ea12bec1bff (diff)
Added tests for zero-arity comp implementation.
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r--test/clojure/test_clojure/other_functions.clj13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/other_functions.clj b/test/clojure/test_clojure/other_functions.clj
index f5b77ad7..550b4df0 100644
--- a/test/clojure/test_clojure/other_functions.clj
+++ b/test/clojure/test_clojure/other_functions.clj
@@ -74,6 +74,19 @@
; partial
; comp
+
+(deftest test-comp
+ (let [c0 (comp)]
+ (are [x] (= (identity x) (c0 x))
+ nil
+ 42
+ [1 2 3]
+ #{}
+ :foo)
+ (are [x y] (= (identity x) (c0 y))
+ (+ 1 2 3) 6
+ (keyword "foo") :foo)))
+
; complement
; constantly