Browse Source

now we can have steps not defined in the case

master
Michał phoe Herda 5 years ago
parent
commit
ea625d4798
  1. 6
      test/failures.lisp
  2. 6
      test/readtable.lisp

6
test/failures.lisp

@ -7,12 +7,14 @@ @@ -7,12 +7,14 @@
(defun failure-after (step step-data test-name error)
(let ((test-step (find (- step 1/2) step-data :key #'car)))
(destructuring-bind (step description phase) test-step
(destructuring-bind (step description phase)
(or test-step (list step "No description provided for this step." nil))
(error *failure-after* test-name phase step description error))))
(defun failure-during (step step-data test-name error)
(let ((test-step (find step step-data :key #'car)))
(destructuring-bind (step description phase) test-step
(destructuring-bind (step description phase)
(or test-step (list step "No description provided for this step." nil))
(error *failure-during* test-name phase step description error))))
(defun failure-internal (step)

6
test/readtable.lisp

@ -8,10 +8,8 @@ @@ -8,10 +8,8 @@
`(progn
(assert *current-step* ()
"The #? macro must be used inside DEFINE-TEST.")
(assert (find ,arg *current-step-data* :key #'car) ()
"Step ~D is not defined in the step data." ,arg)
(prog2 (setf *current-step* ,arg)
,form
(setf *current-step* ,arg)
(multiple-value-prog1 ,form
(setf *current-step* ,(+ arg 1/2))))))
(defreadtable protest

Loading…
Cancel
Save