X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftime.pure.lisp;h=a9aac4c80ab82894eb1d0c5604bbcbf7c1d15e2f;hb=db0110475c0db5dc3cb1bb12de0b0c475880899e;hp=475918b0e2d73cedea39822ed1019cde8cb1c6c7;hpb=9514c25e89aad10784c6d04fea4595d8c8ae68cc;p=sbcl.git diff --git a/tests/time.pure.lisp b/tests/time.pure.lisp index 475918b..a9aac4c 100644 --- a/tests/time.pure.lisp +++ b/tests/time.pure.lisp @@ -4,7 +4,7 @@ ;;;; While most of SBCL is derived from the CMU CL system, the test ;;;; files (like this one) were written from scratch after the fork ;;;; from CMU CL. -;;;; +;;;; ;;;; This software is in the public domain and is provided with ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. @@ -14,16 +14,19 @@ ;;; Test for monotonicity of GET-INTERNAL-RUN-TIME. (On OpenBSD, this ;;; is not a given, because of a longstanding bug in getrusage().) (funcall (compile nil - '(lambda (n-seconds) - (declare (type fixnum n-seconds)) - (let* ((n-internal-time-units - (* n-seconds - internal-time-units-per-second)) - (time0 (get-internal-run-time)) - (time1 (+ time0 n-internal-time-units))) - (loop - (let ((time (get-internal-run-time))) - (assert (>= time time0)) - (when (>= time time1) - (return))))))) - 3) + '(lambda (n-seconds) + (declare (type fixnum n-seconds)) + (let* ((n-internal-time-units + (* n-seconds + internal-time-units-per-second)) + (time0 (get-internal-run-time)) + (time1 (+ time0 n-internal-time-units))) + (loop + (let ((time (get-internal-run-time))) + (assert (>= time time0)) + (when (>= time time1) + (return))))))) + 3) + +(with-test (:name :time/lambdas-converted) + (time (compile nil '(lambda () 42))))