From b82a10a08a56c17d920e8a1aa42979f57ef675f1 Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Sat, 30 Sep 2006 17:54:02 +0200 Subject: [PATCH] Added is-string= --- src/check.lisp | 7 +++++++ src/packages.lisp | 1 + 2 files changed, 8 insertions(+) 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 -- 1.7.10.4