source: trunk/source/tests/ansi-tests/sleep.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun May  8 19:53:39 2005
4;;;; Contains: Tests of SLEEP
5
6(in-package :cl-test)
7
8(deftest sleep.1
9  (sleep 0)
10  nil)
11
12(deftest sleep.2
13  (sleep 0.0s0)
14  nil)
15
16(deftest sleep.3
17  (sleep 0.0f0)
18  nil)
19
20(deftest sleep.4
21  (sleep 0.0d0)
22  nil)
23
24(deftest sleep.5
25  (sleep 0.0l0)
26  nil)
27
28(deftest sleep.6
29  (sleep 1.0f-8)
30  nil)
31
32(deftest sleep.7
33  (sleep 1/100)
34  nil)
35
36(deftest sleep.8
37  (sleep (/ internal-time-units-per-second))
38  nil)
39
40(deftest sleep.9
41  (sleep (/ 1000000000000000000000000000000))
42  nil)
43
44(deftest sleep.10
45  (sleep least-positive-short-float)
46  nil)
47
48(deftest sleep.11
49  (sleep least-positive-single-float)
50  nil)
51
52(deftest sleep.12
53  (sleep least-positive-double-float)
54  nil)
55
56(deftest sleep.13
57  (sleep least-positive-long-float)
58  nil)
59
60;;; Error cases
61
62(deftest sleep.error.1
63  (signals-error (sleep) program-error)
64  t)
65
66(deftest sleep.error.2
67  (signals-error (sleep 100 nil) program-error)
68  t)
69
70(deftest sleep.error.3
71  (check-type-error #'sleep #'(lambda (x) (and (realp x) (>= x 0))))
72  nil)
73
74
75
Note: See TracBrowser for help on using the repository browser.