source: trunk/source/tests/ansi-tests/realpart.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.0 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Sep  7 07:41:15 2003
4;;;; Contains: Tests of REALPART
5
6(in-package :cl-test)
7
8(deftest realpart.error.1
9  (signals-error (realpart) program-error)
10  t)
11
12(deftest realpart.error.2
13  (signals-error (realpart #c(1.0 2.0) nil) program-error)
14  t)
15
16(deftest realpart.error.3
17  (check-type-error #'realpart #'numberp)
18  nil)
19
20(deftest realpart.1
21  (loop for x in *reals*
22        for c = (complex x 0)
23        for rp = (realpart c)
24        unless (eql x rp)
25        collect (list x c rp))
26  nil)
27
28(deftest realpart.2
29  (loop for x in *reals*
30        for c = (complex x 1)
31        for rp = (realpart c)
32        unless (eql x rp)
33        collect (list x c rp))
34  nil)
35
36(deftest realpart.3
37  (loop for x in *reals*
38        for c = (complex x x)
39        for rp = (realpart c)
40        unless (eql x rp)
41        collect (list x c rp))
42  nil)
43
44;;; Should move this to complex.lsp
45(deftest realpart.4
46  (loop for c in *complexes*
47        for rp = (realpart c)
48        for ip = (imagpart c)
49        for c2 = (complex rp ip)
50        unless (eql c c2)
51        collect (list c rp ip c2))
52  nil)
Note: See TracBrowser for help on using the repository browser.