Skip to content

Commit bbf2157

Browse files
author
Thomas M. Hermann
committed
Add the arguments of the test form to extras in assert-true and assert-false.
1 parent aeb6329 commit bbf2157

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lisp-unit.lisp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ output if a test fails.
442442

443443
(defmacro assert-false (form &rest extras)
444444
"Assert whether the form is false."
445-
`(expand-assert :result ,form ,form nil ,extras))
445+
(let ((extras `(,@(cdr form) ,@extras)))
446+
`(expand-assert :result ,form ,form nil ,extras)))
446447

447448
(defmacro assert-equality (test expected form &rest extras)
448449
"Assert whether expected and form are equal according to test."
@@ -455,7 +456,8 @@ output if a test fails.
455456

456457
(defmacro assert-true (form &rest extras)
457458
"Assert whether the form is true."
458-
`(expand-assert :result ,form ,form t ,extras))
459+
(let ((extras `(,@(cdr form) ,@extras)))
460+
`(expand-assert :result ,form ,form t ,extras)))
459461

460462
(defmacro expand-assert (type form body expected extras &key (test '#'eql))
461463
"Expand the assertion to the internal format."

0 commit comments

Comments
 (0)