1 -*- mode: markdown; coding: utf-8-unix; -*-
3 CL-MOCK - Mocking (generic) functions.
5 Copyright (C) 2013 Olof-Joachim Frahm
7 Release under a Simplified BSD license.
9 Working, but unfinished.
11 Should be portable thanks to [`CLOSER-MOP`][1].
13 Since it is pretty easy to just roll something like this on your own,
14 the main purpose is to develop a nice syntax (lispy, declarative) to
15 keep tests readable and maintainable.
17 Some parts may be used independently of the testing facilities,
18 e.g. dynamic `FLET` and method bindings with `PROGM` may be of general
24 `DFLET` dynamically rebinds functions similar to `FLET`:
27 > (defun bar () (foo))
30 > (dflet ((foo () 23))
33 > (OR) => 42, if FOO was inlined
35 The caveat is that this might not work on certain optimization settings,
38 The underlying function `PROGF` may be used as well similarly to standard
41 > (progf '(foo) (list (lambda () 23))
44 > (OR) => 42, if FOO was inlined
47 [1]: http://common-lisp.net/project/closer/closer-mop.html