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 (in-package "CL-USER")
14 ;;; Test for monotonicity of GET-INTERNAL-RUN-TIME.
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)))
24 (let ((time (get-internal-run-time)))
25 (assert (>= time time0))
31 (declare (notinline mapcar))
32 (mapcar (lambda (args)
33 (destructuring-bind (obj type-spec result) args
34 (flet ((matches-result? (x)
35 (eq (if x t nil) result)))
36 (assert (matches-result? (typep obj type-spec)))
37 (assert (matches-result? (sb-kernel:ctypep
39 (sb-kernel:specifier-type
41 '((nil (or null vector) t)
42 (nil (or number vector) nil)
43 (12 (or null vector) nil)
44 (12 (and (or number vector) real) t))))