Last active
June 22, 2017 15:57
-
-
Save puredanger/84c0e247aeaf3a2dbd331a12f8734e41 to your computer and use it in GitHub Desktop.
fspec missing gen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.spec.alpha :as s] '[clojure.spec.test.alpha :as stest]) | |
(s/def ::cb (s/fspec :args (s/cat :e #(instance? Throwable %)))) | |
(s/fdef foo :args (s/cat :e ::cb)) | |
(defn foo [e]) | |
(stest/instrument `foo) | |
(foo (fn [e] e)) | |
ExceptionInfo Unable to construct gen at: [:e] for: (instance? java.lang.Throwable %) clojure.core/ex-info (core.clj:4727) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That looks like a minimal version of what I'm trying to accomplish, yes.