X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdynamic-extent.impure.lisp;h=fec38398a8b779c0e157b9082f26069b1d02a560;hb=f2db6743b1fadeea9e72cb583d857851c87efcd4;hp=769ce5d211e57a62e7c2ca79dee26105d1e5722a;hpb=b3c5951a9d24468a2a471fd6769d0e6b687c08f3;p=sbcl.git diff --git a/tests/dynamic-extent.impure.lisp b/tests/dynamic-extent.impure.lisp index 769ce5d..fec3839 100644 --- a/tests/dynamic-extent.impure.lisp +++ b/tests/dynamic-extent.impure.lisp @@ -14,6 +14,9 @@ (when (eq sb-ext:*evaluator-mode* :interpret) (sb-ext:quit :unix-status 104)) +(load "compiler-test-util.lisp") +(use-package :ctu) + (setq sb-c::*check-consistency* t sb-ext:*stack-allocate-dynamic-extent* t) @@ -481,26 +484,6 @@ (setf (gethash 5 *table*) 13) (gethash 5 *table*)) -(defmacro assert-no-consing (form &optional times) - `(%assert-no-consing (lambda () ,form) ,times)) -(defun %assert-no-consing (thunk &optional times) - (let ((before (get-bytes-consed)) - (times (or times 10000))) - (declare (type (integer 1 *) times)) - (dotimes (i times) - (funcall thunk)) - (assert (< (- (get-bytes-consed) before) times)))) - -(defmacro assert-consing (form &optional times) - `(%assert-consing (lambda () ,form) ,times)) -(defun %assert-consing (thunk &optional times) - (let ((before (get-bytes-consed)) - (times (or times 10000))) - (declare (type (integer 1 *) times)) - (dotimes (i times) - (funcall thunk)) - (assert (not (< (- (get-bytes-consed) before) times))))) - (defvar *a-cons* (cons nil nil)) (progn