-(handler-bind ((step-condition (lambda (c)
- (funcall *stepper-hook* c))))
- (with-test (:name :step-into)
- (test-step-into))
- (with-test (:name :step-next)
- (test-step-next))
- (with-test (:name :step-out)
- (test-step-out))
- (with-test (:name :step-start-from-break)
- (test-step-start-from-break))
- (with-test (:name :step-frame)
- (test-step-frame))
- (with-test (:name :step-backtrace)
+(defun test-step-next/2 ()
+ (let* ((results nil)
+ (expected '(("(IN)" ())
+ ("(PRINT 1)" (1))
+ ("(PRINT 2)" (2))
+ ("(PRINT 3)" (3))
+ ("(PRINT 4)" (4))))
+ (count 0)
+ (*stepper-hook* (lambda (condition)
+ (typecase condition
+ (step-form-condition
+ (push (list (step-condition-form condition)
+ (step-condition-args condition))
+ results)
+ (if (>= (incf count) 3)
+ (invoke-restart 'step-into)
+ (invoke-restart 'step-into)))))))
+ (step (out))
+ (assert (equal expected (reverse results)))))
+
+(defun test-step-out/2 ()
+ (let* ((results nil)
+ (expected '(("(IN)" ())
+ ("(PRINT 1)" (1))
+ ("(PRINT 2)" (2))))
+ (count 0)
+ (*stepper-hook* (lambda (condition)
+ (typecase condition
+ (step-form-condition
+ (push (list (step-condition-form condition)
+ (step-condition-args condition))
+ results)
+ (if (>= (incf count) 3)
+ (invoke-restart 'step-out)
+ (invoke-restart 'step-into)))))))
+ (step (out))
+ (assert (equal expected (reverse results)))))
+
+(with-test (:name :step-into)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))
+ (test-step-into)))
+
+(with-test (:name :step-next)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))
+ (test-step-next)))
+
+(with-test (:name :step-out)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))
+ (test-step-out)))
+
+(with-test (:name :step-start-from-break
+ :fails-on :mips)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))
+ (test-step-start-from-break)))
+
+(with-test (:name :step-frame)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))
+ (test-step-frame)))
+
+(with-test (:name :step-backtrace)
+ (handler-bind ((step-condition #'sb-impl::invoke-stepper))