Liking cljdoc? Tell your friends :D

alike.core

A simple matching library, moslty for tests. Usage:

(require '[alike.core :as alike]) ;; to extend clojure.test/do-report

(is (alike {:foo 42} (get-data))

Extending:

(defmethod -match [org.test.ExpectedType org.test.ActualType] [expected actual] (or (checking-logic? expected actual) (mismatch set obj :some-unique-tag)))

(defmethod -explain :some-unique-tag [mismatch] (format <your error %s message %s saying %s what is wrong> ...))

A simple matching library, moslty for tests. Usage:

(require '[alike.core :as alike]) ;; to extend clojure.test/do-report

(is (alike {:foo 42} (get-data))

Extending:

(defmethod -match [org.test.ExpectedType org.test.ActualType]
  [expected actual]
  (or (checking-logic? expected actual)
      (mismatch set obj :some-unique-tag)))

(defmethod -explain :some-unique-tag [mismatch]
  (format <your error %s message %s saying %s what is wrong>
          ...))

raw docstring

-explaincljmultimethod

source

-matchcljmultimethod

source

ARRAY_BOOLclj

source

ARRAY_BYTEclj

source

ARRAY_CHARclj

source

ARRAY_DOUBLEclj

source

ARRAY_FLOATclj

source

ARRAY_INTclj

source

ARRAY_LONGclj

source

ARRAY_OBJclj

source

ARRAY_SHORTclj

source

countclj

(count n)
source

IMismatchcljprotocol

-pushclj

(-push this level)
source

IReprcljprotocol

-reprclj

(-repr this)
source

matchclj

(match expected actual)

A top-level API function to call. Transforms negative results into Mismatch objects. The result is always one of these:

  • Mismatch
  • true
A top-level API function to call. Transforms
negative results into Mismatch objects. The
result is always one of these:
- Mismatch
- true
sourceraw docstring

mismatchclj

(mismatch expected actual)
(mismatch expected actual tag)
(mismatch expected actual tag level)

Build a Mismatch object in various ways.

Build a Mismatch object in various ways.
sourceraw docstring

mismatch?clj

(mismatch? x)
source

MISSINGclj

source

REPR_LIMITclj

source

substringclj

(substring string)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close