Use ROTATEF
[fiveam.git] / src / check.lisp
index 8325bde..12f2256 100644 (file)
@@ -1,6 +1,6 @@
-;; -*- lisp -*-
+;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
 
-(in-package :it.bese.FiveAM)
+(in-package :it.bese.fiveam)
 
 ;;;; * Checks
 
@@ -127,7 +127,7 @@ REASON-ARGS is provided, is generated based on the form of TEST:
           (test)
           "Argument to IS must be a list, not ~S" test)
   (let (bindings effective-test default-reason-args)
-    (with-unique-names (e a v)
+    (with-gensyms (e a v)
       (flet ((process-entry (predicate expected actual &optional negatedp)
                ;; make sure EXPECTED is holding the entry that starts with 'values
                (when (and (consp actual)
@@ -135,9 +135,7 @@ REASON-ARGS is provided, is generated based on the form of TEST:
                  (assert (not (and (consp expected)
                                    (eq (car expected) 'values))) ()
                                    "Both the expected and actual part is a values expression.")
-                 (let ((tmp expected))
-                   (setf expected actual
-                         actual tmp)))
+                 (rotatef expected actual))
                (let ((setf-forms))
                  (if (and (consp expected)
                           (eq (car expected) 'values))
@@ -229,8 +227,8 @@ REASON-ARGS is provided, is generated based on the form of TEST:
   failure otherwise. Like IS-TRUE, and unlike IS, IS-FALSE does
   not inspect CONDITION to determine what reason to give it case
   of test failure"
-  
-  (with-unique-names (value)
+
+  (with-gensyms (value)
     `(let ((,value ,condition))
        (if ,value
            (process-failure