From: Attila Lendvai Date: Sat, 30 Sep 2006 15:54:02 +0000 (+0200) Subject: Added is-string= X-Git-Url: http://repo.macrolet.net/gitweb/?p=fiveam.git;a=commitdiff_plain;h=b82a10a08a56c17d920e8a1aa42979f57ef675f1 Added is-string= --- diff --git a/src/check.lisp b/src/check.lisp index 8d5f99f..e2a4a95 100644 --- a/src/check.lisp +++ b/src/check.lisp @@ -184,6 +184,13 @@ If the value is a (values a b * d *) form then the elements at * are not compare (is (equal ,expr-result (multiple-value-list ,value)))) else collect `(is (equal ,expr ,value)))))) +(defmacro is-string= (&rest args) + "Generates (is (string= ,expr ,value)) for each pair of elements." + `(progn + ,@(loop for (expr value) on args by #'cddr + do (assert (and expr value)) + collect `(is (string= ,expr ,value))))) + (defmacro is-true (condition &rest reason-args) "Like IS this check generates a pass if CONDITION returns true and a failure if CONDITION returns false. Unlike IS this check diff --git a/src/packages.lisp b/src/packages.lisp index a041cfa..34436f3 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -39,6 +39,7 @@ ;; running checks #:is #:is-equal + #:is-string= #:is-true #:is-false #:signals