-
Notifications
You must be signed in to change notification settings - Fork 21
/
test.cljc
26 lines (23 loc) · 1005 Bytes
/
test.cljc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(ns matcher-combinators.test
"Integration with clojure.test or cljs.test (depending on which platform
you're running on)."
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
#?(:cljs [matcher-combinators.cljs-test]
:clj [matcher-combinators.clj-test])))
(declare ^{:arglists '([matcher actual])}
match?)
(declare ^{:arglists '([type->matcher matcher actual])}
match-with?)
(declare ^{:arglists '([matcher actual]
[exception-class matcher actual])}
thrown-match?)
(declare ^{:arglists '([delta matcher actual])}
match-roughly?)
#?(:clj
(def build-match-assert
"Allows you to define a custom clojure.test match assert:
`(defmethod clojure.test/assert-expr 'abs-value? [msg form]
(build-match-assert 'abs-value? [int? abs-value-matcher] msg form))`"
matcher-combinators.clj-test/build-match-assert))