matrix-set-all-m+.lisp 7.58 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
;; Regression test MATRIX-SET-ALL-M+ for GSLL, automatically generated

(in-package :gsl)

(LISP-UNIT:DEFINE-TEST MATRIX-SET-ALL-M+
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((8.23 50.97 46.02)
                             (33.8 76.85 36.579998)
                             (92.0 29.24 75.229996)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
12 13 14 15 16 17 18 19 20
                         (LET ((M1
                                (MAKE-MARRAY 'SINGLE-FLOAT :DIMENSIONS '(3 3)))
                               (M2
                                (MAKE-MARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5 8.24 3.29)
                                               (-8.93 34.12 -6.15)
                                               (49.27 -13.49 32.5)))))
                           (SET-ALL M1 42.73)
                           (CL-ARRAY (M+ M1 M2)))))
21 22 23 24 25 26 27
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((8.229999999999997d0 50.97d0 46.019999999999996d0)
                             (33.8d0 76.85d0 36.58d0)
                             (92.0d0 29.239999999999995d0
                              75.22999999999999d0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
28 29 30 31 32 33 34 35 36
                         (LET ((M1
                                (MAKE-MARRAY 'DOUBLE-FLOAT :DIMENSIONS '(3 3)))
                               (M2
                                (MAKE-MARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5d0 8.24d0 3.29d0)
                                               (-8.93d0 34.12d0 -6.15d0)
                                               (49.27d0 -13.49d0 32.5d0)))))
                           (SET-ALL M1 42.73d0)
                           (CL-ARRAY (M+ M1 M2)))))
37 38 39
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -36 103) (-59 84 22) (105 27 -101)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
40 41 42 43 44 45 46 47 48
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123)))))
                           (SET-ALL M1 32)
                           (CL-ARRAY (M+ M1 M2)))))
49 50 51
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 72 217) (144 191 168) (189 243 126)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
52 53 54 55 56 57 58 59 60 61
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98)))))
                           (SET-ALL M1 28)
                           (CL-ARRAY (M+ M1 M2)))))
62 63 64
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -36 103) (-59 84 22) (105 27 155)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
65 66 67 68 69 70 71 72 73 74
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 16) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123)))))
                           (SET-ALL M1 32)
                           (CL-ARRAY (M+ M1 M2)))))
75 76 77
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 72 217) (144 191 168) (189 243 126)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
78 79 80 81 82 83 84 85 86 87
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98)))))
                           (SET-ALL M1 28)
                           (CL-ARRAY (M+ M1 M2)))))
88 89 90
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -36 103) (-59 84 22) (105 27 155)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
91 92 93 94 95 96 97 98 99 100
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 32) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123)))))
                           (SET-ALL M1 32)
                           (CL-ARRAY (M+ M1 M2)))))
101 102 103
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 72 217) (144 191 168) (189 243 126)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
104 105 106 107 108 109 110 111 112 113
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98)))))
                           (SET-ALL M1 28)
                           (CL-ARRAY (M+ M1 M2)))))
114
		       #+int64
115 116 117
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -36 103) (-59 84 22) (105 27 155)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
118 119 120 121 122 123 124 125 126 127
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 64) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123)))))
                           (SET-ALL M1 32)
                           (CL-ARRAY (M+ M1 M2)))))
128
		       #+int64
129 130 131
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 72 217) (144 191 168) (189 243 126)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
132 133 134 135 136 137 138 139 140 141
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64) :DIMENSIONS
                                             '(3 3)))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98)))))
                           (SET-ALL M1 28)
                           (CL-ARRAY (M+ M1 M2))))))
142