Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removed seq-contains? calls

  • Loading branch information...
commit eb7021af8260c17e29d2653a3de982fb48e1e6c8 1 parent 5a703b3
Rich Hickey authored May 01, 2010
3  src/test/clojure/clojure/contrib/test_jmx.clj
@@ -26,7 +26,8 @@
26 26
   "Does container contain every item in containee?
27 27
    Not fast. Testing use only"
28 28
   [container containee]
29  
-  (every? #(seq-contains? container %) containee))
  29
+  (let [container (set container)]
  30
+    (every? #(contains? container %) containee)))
30 31
 
31 32
 (deftest finding-mbeans
32 33
   (testing "as-object-name"
10  src/test/clojure/clojure/contrib/test_repl_utils.clj
@@ -5,16 +5,16 @@
5 5
 (deftest test-apropos
6 6
   (testing "with a regular expression"
7 7
     (is (= '[defmacro] (apropos #"^defmacro$")))
8  
-    (is (seq-contains? (apropos #"def.acr.") 'defmacro))
  8
+    (is (some '#{defmacro} (apropos #"def.acr.")))
9 9
     (is (= [] (apropos #"nothing-has-this-name"))))
10 10
   
11 11
 
12 12
   (testing "with a string"
13  
-    (is (seq-contains? (apropos "defmacro") 'defmacro))
14  
-    (is (seq-contains? (apropos "efmac") 'defmacro))
  13
+    (is (some '#{defmacro} (apropos "defmacro")))
  14
+    (is (some '#{defmacro} (apropos "efmac")))
15 15
     (is (= [] (apropos "nothing-has-this-name"))))
16 16
 
17 17
   (testing "with a symbol"
18  
-    (is (seq-contains? (apropos 'defmacro) 'defmacro))
19  
-    (is (seq-contains? (apropos 'efmac) 'defmacro))
  18
+    (is (some '#{defmacro} (apropos 'defmacro)))
  19
+    (is (some '#{defmacro} (apropos 'efmac)))
20 20
     (is (= [] (apropos 'nothing-has-this-name)))))
4  src/test/clojure/clojure/contrib/test_with_ns.clj
@@ -6,7 +6,7 @@
6 6
   (let [all-ns-names (fn [] (map #(.name %) (all-ns)))]
7 7
     (testing "unexceptional return"
8 8
       (let [ns-name (with-temp-ns (ns-name *ns*))]
9  
-        (is (not (seq-contains? (all-ns-names) ns-name)))))
  9
+        (is (not (some #{ns-name} (all-ns-names))))))
10 10
     (testing "when an exception is thrown"
11 11
       (let [ns-name-str
12 12
             (try
@@ -15,4 +15,4 @@
15 15
              (catch clojure.lang.Compiler$CompilerException e
16 16
                (-> e .getCause .getMessage)))]
17 17
         (is (re-find #"^sym.*$" ns-name-str))
18  
-        (is (not (seq-contains? (all-ns-names) (symbol ns-name-str))))))))
  18
+        (is (not (some #{(symbol ns-name-str)} (all-ns-names))))))))

0 notes on commit eb7021a

Please sign in to comment.
Something went wrong with that request. Please try again.