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