diff options
Diffstat (limited to 'test.lisp')
| -rw-r--r-- | test.lisp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -8,7 +8,7 @@ (format nil "~a" result) (format nil "~a" (parsing-tree result)))) -(defun check-result (actual expected input) +(defun check-result (actual expected) (cond ((eq expected :failure) (or (failure-p actual) (progn @@ -19,7 +19,7 @@ (or (funcall expected actual) (progn (format t "~tFAIL: custom check failed~&") - (format t "~t~tInput: ~a~&" input) + (format t "~t~tInput: ~a~&" (result-place actual)) (format t "~t~tResult: ~a~&" actual) (incf *test-failed*) nil))) @@ -61,9 +61,10 @@ (input (second test)) (expected (third test))) (push `(let ((actual (parse ,parser ,input))) - (if (check-result actual ,expected ,input) + (if (check-result actual ,expected) (incf *test-passed*) - (incf *test-failed*))) test-forms))) + (incf *test-failed*))) + test-forms))) (setf test-forms (nreverse test-forms)) `(progn (let ((had-failures *test-failed*)) |
