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

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

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

File size: 1.3 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Mon Aug  4 21:42:14 2003
4;;;; Contains: Tests for PLUSP
5
6(in-package :cl-test)
7
8;;; Error tests
9
10(deftest plusp.error.1
11  (signals-error (plusp) program-error)
12  t)
13
14(deftest plusp.error.2
15  (signals-error (plusp 0 0) program-error)
16  t)
17
18(deftest plusp.error.3
19  (signals-error (plusp 0 nil) program-error)
20  t)
21
22(deftest plusp.error.4
23  (check-type-error #'plusp #'realp)
24  nil)
25
26;;; Non-error tests
27
28(deftest plusp.1
29  (plusp 0)
30  nil)
31
32(deftest plusp.2
33  (plusp -1)
34  nil)
35
36(deftest plusp.3
37  (notnot-mv (plusp 1))
38  t)
39
40(deftest plusp.4
41  (loop for x in *reals*
42        when (if (plusp x) (<= x 0) (> x 0))
43        collect x)
44  nil)
45
46(deftest plusp.5
47  (some #'plusp '(-0.0s0 -0.0f0 -0.0d0 -0.0l0))
48  nil)
49
50(deftest plusp.6
51  (some #'plusp '(0.0s0 0.0f0 0.0d0 0.0l0))
52  nil)
53
54(deftest plusp.7
55  (remove-if #'plusp
56             (list least-positive-short-float
57                   least-positive-normalized-short-float
58                   least-positive-single-float
59                   least-positive-normalized-single-float
60                   least-positive-double-float
61                   least-positive-normalized-double-float
62                   least-positive-long-float
63                   least-positive-normalized-long-float
64                   most-positive-short-float
65                   most-positive-single-float
66                   most-positive-double-float
67                   most-positive-long-float))
68  nil)
69
Note: See TracBrowser for help on using the repository browser.