Skip to content
Browse files

removed seq-contains? calls

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

0 comments on commit eb7021a

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