From 1d1050cdab39cfad01bd1341a250a7670dac4e65 Mon Sep 17 00:00:00 2001 From: Marco Baringer Date: Mon, 10 Dec 2012 17:47:01 +0100 Subject: [PATCH] Document the handling of values in the IS check macro. Whether this surves any purpose at all is up to debate. --- src/check.lisp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/check.lisp b/src/check.lisp index 8c9685f..96d48fa 100644 --- a/src/check.lisp +++ b/src/check.lisp @@ -114,11 +114,17 @@ If TEST returns a true value a test-passed result is generated, otherwise a test-failure result is generated. The reason, unless REASON-ARGS is provided, is generated based on the form of TEST: -\(predicate expected actual) - Means that we want to check whether, -according to PREDICATE, the ACTUAL value is in fact what we EXPECTED. +`(predicate expected actual)`:: -\(predicate value) - Means that we want to ensure that VALUE satisfies -PREDICATE. +Means that we want to check whether, according to PREDICATE, the +ACTUAL value is in fact what we EXPECTED. `expected` can also be a +values form, `(cl:values &rest values)`. In this case the values +returned by `actual` will be converted to a list and that list will be +compared, via `predicate` to the list `values`. + +`(predicate value)`:: + +Means that we want to ensure that VALUE satisfies PREDICATE. Wrapping the TEST form in a NOT simply produces a negated reason string." -- 1.7.10.4