1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; While most of SBCL is derived from the CMU CL system, the test
5 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; This software is in the public domain and is provided with
9 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
10 ;;;; more information.
12 ;;; Test for monotonicity of GET-INTERNAL-RUN-TIME. (On OpenBSD, this
13 ;;; is not a given, because of a longstanding bug in getrusage().)
14 (with-test (:name
(get-internal-run-time :monotonic
))
15 (checked-compile-and-assert (:optimize nil
)
17 (declare (type fixnum n-seconds
))
18 (let* ((n-internal-time-units
20 internal-time-units-per-second
))
21 (time0 (get-internal-run-time))
22 (time1 (+ time0 n-internal-time-units
)))
23 (loop for time
= (get-internal-run-time)
25 always
(>= time time0
))))
28 (with-test (:name
(time :lambdas-converted
))
29 (let ((output (with-output-to-string (*trace-output
*)
30 (time (checked-compile '(lambda () 42))))))
31 (assert (search "1 lambda converted" output
))))