             (update :total inc)
             (update (result-type result) (fnil inc 0))))
       {:total 0}
-       test-results)))
-
-
-
+       check-results)))
+
+
+

      {::s/failure :no-fn :sym s :spec spec}
    
      (:args spec)
      (let [tcret (check-fn f spec opts)]
        (make-test-result s spec tcret))
    
      :default
      {::s/failure :no-args-spec :sym s :spec spec}))
   (finally
    (when v (instrument s)))))

(defn- sym->test-map
  [s]
  (let [v (resolve s)]
    {:s s
     :v v
     :spec (when v (s/get-spec v))}))

(defn- validate-test-opts
  [opts]
  (assert (every? ident? (keys (:gen opts))) "test :gen expects ident keys"))

(defn test-fn
  "Runs generative tests for fn f using spec and opts. See
'test' for options and return."
  ([f spec] (test-fn f spec nil))
  ([f spec opts]
     (validate-test-opts opts)
     (test-1 {:f f :spec spec} opts)))

(defn testable-syms
  "Given an opts map as per test, returns the set of syms that
can be tested."
  ([] (testable-syms nil))
  ([opts]
     (validate-test-opts opts)
     (reduce into #{} [(filter fn-spec-name? (keys (s/registry)))
                       (keys (:spec opts))])))

(defn test
  "Run generative tests for spec conformance on vars named by
sym-or-syms, a symbol or collection of symbols. If sym-or-syms
is not specified, test all testable vars.

The opts map includes the following optional keys, where stc
aliases clojure.spec.test.check: 

          current @v
          to-wrap (if (= wrapped current) raw current)
          ospec (or (instrument-choose-spec spec s opts)
                      (throw (no-fspec v spec)))
          ofn (instrument-choose-fn to-wrap ospec s opts)
          checked (spec-checking-fn v ofn ospec)]
      (alter-var-root v (constantly checked))
