]> asedeno.scripts.mit.edu Git - cl-protobufs.git/commitdiff
Tweak definition of ASSERT-EQUAL
authorAlejandro R Sedeño <asedeno@google.com>
Mon, 17 Dec 2012 19:50:37 +0000 (14:50 -0500)
committerAlejandro R Sedeño <asedeno@google.com>
Mon, 17 Dec 2012 19:50:37 +0000 (14:50 -0500)
tests/qtest.lisp
tests/serialization-tests.lisp

index bbcab3ad9be4736ff118554ffa37222d8b4996f6..7b234495a4719e243379f0711ef5fe4d8b8c0568 100644 (file)
@@ -46,8 +46,8 @@
     (format t "~&Running test ~A" test)
     (funcall test)))
 
-(defmacro assert-equal (actual expected &key (test 'equal))
-  `(unless (,test ,actual ,expected)
+(defmacro assert-equal (actual expected &key (test '#'equal))
+  `(unless (funcall ,test ,actual ,expected)
      (warn "The value ~S is not equal to the expected value ~S"
            ',actual ',expected)))
 
index 23da95188d717a829b65908935f944dc175bd1ee..4c84bc9f6645113bfd8142b493fdc40c8dcdd011 100644 (file)
   (let* ((msg1 (make-instance 'type-alias-test-message :test-field 5))
          (ser1 (proto:serialize-object-to-bytes msg1 'type-alias-test-message))
          (dser1 (deserialize-object 'type-alias-test-message ser1)))
-    (assert-equal ser1 #(10 1 53) :test equalp)
+    (assert-equal ser1 #(10 1 53) :test #'equalp)
     (assert-equal (slot-value msg1 'test-field)
                   (slot-value dser1 'test-field))))