From 9218249b8b1bfb6df3f10a77e3a3bc0461e4c662 Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Thu, 25 Oct 2012 20:00:58 -0500 Subject: [PATCH] Add test for multi-collection `map-indexed` fn --- test/clojure/test_clojure/sequences.clj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/clojure/test_clojure/sequences.clj b/test/clojure/test_clojure/sequences.clj index e69fdbb..6789211 100644 --- a/test/clojure/test_clojure/sequences.clj +++ b/test/clojure/test_clojure/sequences.clj @@ -18,6 +18,12 @@ ; apply, map, filter, remove ; and more... +(deftest test-map-indexed + (is (= (map-indexed vector '(\a \b \c \d \e)) + '([0 \a] [1 \b] [2 \c] [3 \d] [4 \e]))) + (is (= (map-indexed + (cycle '(4 2)) (range 0 100 20) (repeat 1)) + '(5 24 47 66 89)))) + (deftest test-reduce-from-chunked-into-unchunked (= [1 2 \a \b] (into [] (concat [1 2] "ab")))) -- 1.7.11.4