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