diff options
| author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2026-08-28 06:16:12 -0300 |
|---|---|---|
| committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2026-08-28 06:16:12 -0300 |
| commit | 401fd8f16664d81d84c2fd7ecbc2333d6f3ec108 (patch) | |
| tree | 72f168f760a8bb521a73535b46feafd29b33c2c0 /test.lisp | |
| parent | 0150531bb547fc5f2a193eb3fa51e654e67c73e5 (diff) | |
| download | monparser-401fd8f16664d81d84c2fd7ecbc2333d6f3ec108.tar.gz monparser-401fd8f16664d81d84c2fd7ecbc2333d6f3ec108.zip | |
Prepare for new tracing and tidy up testing
Main stuff was moved into base so that I can better incorporate
tracing in the future. I'm thinking it will involve modifying
new and bind.
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*)) |
