X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdebug.impure.lisp;h=b9709f2b5cb792e71363592da45ce7172df1d0a8;hb=ebc0f0ebf9efd39519ab86ba28c33abdb25443e0;hp=bd9526d93022d85db799ded73ea4d2cecbb23c0c;hpb=f35f14479a64dd97f93d2d91dc154bdc141d6842;p=sbcl.git diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index bd9526d..b9709f2 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -340,6 +340,11 @@ (defun trace-this () 'ok) +(defun trace-fact (n) + (if (zerop n) + 1 + (* n (trace-fact (1- n))))) + (let ((out (with-output-to-string (*trace-output*) (trace trace-this) (assert (eq 'ok (trace-this))) @@ -353,7 +358,7 @@ ;;; on that platform. #-(and (or ppc x86) darwin) (with-test (:name (trace :encapsulate nil) - :fails-on '(or ppc sparc)) + :fails-on '(or :ppc :sparc :mips)) (let ((out (with-output-to-string (*trace-output*) (trace trace-this :encapsulate nil) (assert (eq 'ok (trace-this))) @@ -361,6 +366,17 @@ (assert (search "TRACE-THIS" out)) (assert (search "returned OK" out)))) +#-(and (or ppc x86) darwin) +(with-test (:name (trace-recursive :encapsulate nil) + :fails-on '(or :ppc :sparc :mips)) + (let ((out (with-output-to-string (*trace-output*) + (trace trace-fact :encapsulate nil) + (assert (= 120 (trace-fact 5))) + (untrace)))) + (assert (search "TRACE-FACT" out)) + (assert (search "returned 1" out)) + (assert (search "returned 120" out)))) + ;;;; test infinite error protection (defmacro nest-errors (n-levels error-form)