1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00

gpgscm: Make assert macro more accurate.

* tests/gpgscm/lib.scm (assert): Print the representation of the
failed expression.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-07-21 18:05:58 +02:00
parent 7207b2fe45
commit 699c6c9f4b

View File

@ -20,7 +20,8 @@
(macro (assert form) (macro (assert form)
`(if (not ,(cadr form)) `(if (not ,(cadr form))
(begin (begin
(display (list "Assertion failed:" (quote ,(cadr form)))) (display "Assertion failed: ")
(write (quote ,(cadr form)))
(newline) (newline)
(exit 1)))) (exit 1))))
(assert #t) (assert #t)