From 401fd8f16664d81d84c2fd7ecbc2333d6f3ec108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Fri, 28 Aug 2026 06:16:12 -0300 Subject: 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. --- test.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test.lisp') diff --git a/test.lisp b/test.lisp index 358ceb4..1d98702 100644 --- a/test.lisp +++ b/test.lisp @@ -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*)) -- cgit v1.2.3