              [cljs.test :refer [is deftest]]
              [cljs.test.check.cljs-test :refer [defspec]]
              [com.rpl.specter.cljs-test-helpers :refer [for-all+]]))
-  (:use 
+  (:use
     #?(:clj [clojure.test :only [deftest is]])
     #?(:clj [clojure.test.check.clojure-test :only [defspec]])
     #?(:clj [com.rpl.specter.test-helpers :only [for-all+]])

         k (if (pred v1) k2 k3)]
     (and
       (= (s/transform (s/if-path [k1 pred] k2 k3) inc m)
          (s/transform k inc m)) 
       (= (s/select (s/if-path [k1 pred] k2 k3) m)
          (s/select k m)) 
       ))))

(defspec multi-path-test

  (is (thrown? #?(:clj Exception :cljs js/Error) (s/select-one! s/ALL [])))
  )


(defspec transformed-test
  (for-all+
    [v (gen/vector gen/int)
     pred (gen/elements [even? odd?])
     op   (gen/elements [inc dec])]
    (= (s/select-one (s/transformed [s/ALL pred] op) v)
       (s/transform [s/ALL pred] op v))
    ))
