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.4 KB

Line  

1  ;* Mode: Lisp * 

2  ;;;; Author: Paul Dietz 

3  ;;;; Created: Sat Sep 6 21:07:36 2003 

4  ;;;; Contains: Tests of CONJUGATE 

5  

6  (inpackage :cltest) 

7  

8  ;;; Error tests 

9  

10  (deftest conjugate.error.1 

11  (signalserror (conjugate) programerror) 

12  t) 

13  

14  (deftest conjugate.error.2 

15  (signalserror (conjugate 0 0) programerror) 

16  t) 

17  

18  ;;; Nonerror tests 

19  

20  (deftest conjugate.1 

21  (loop for x in *reals* 

22  for vals = (multiplevaluelist (conjugate x)) 

23  for xc = (car vals) 

24  always (and (= (length vals) 1) 

25  (eql x xc))) 

26  t) 

27  

28  (deftest conjugate.2 

29  (loop for x in *complexes* 

30  for vals = (multiplevaluelist (conjugate x)) 

31  for xc = (car vals) 

32  always (and (= (length vals) 1) 

33  (eql (realpart x) (realpart xc)) 

34  (eql ( (imagpart x)) (imagpart xc)))) 

35  t) 

36  

37  (deftest conjugate.3 

38  (eqlt (conjugate #c(0.0s0 0.0s0)) #c(0.0s0 0.0s0)) 

39  t) 

40  

41  (deftest conjugate.4 

42  (eqlt (conjugate #c(1.0s0 0.0s0)) #c(1.0s0 0.0s0)) 

43  t) 

44  

45  (deftest conjugate.5 

46  (eqlt (conjugate #c(0.0f0 0.0f0)) #c(0.0f0 0.0f0)) 

47  t) 

48  

49  (deftest conjugate.6 

50  (eqlt (conjugate #c(1.0f0 0.0f0)) #c(1.0f0 0.0f0)) 

51  t) 

52  

53  (deftest conjugate.7 

54  (eqlt (conjugate #c(0.0d0 0.0d0)) #c(0.0d0 0.0d0)) 

55  t) 

56  

57  (deftest conjugate.8 

58  (eqlt (conjugate #c(1.0d0 0.0d0)) #c(1.0d0 0.0d0)) 

59  t) 

60  

61  (deftest conjugate.9 

62  (eqlt (conjugate #c(0.0l0 0.0l0)) #c(0.0l0 0.0l0)) 

63  t) 

64  

65  (deftest conjugate.10 

66  (eqlt (conjugate #c(1.0l0 0.0l0)) #c(1.0l0 0.0l0)) 

67  t) 

Note: See
TracBrowser
for help on using the repository browser.