File: test.lsp

package info (click to toggle)
xlispstat 3.52.0-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 7,472 kB
  • ctags: 12,480
  • sloc: ansic: 89,534; lisp: 21,690; sh: 1,525; makefile: 520; csh: 1
file content (22 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(setf *test-files*
      (list "arith" "complex" "manip" "matrix" "matrix2" "blas"
	    "math" "prob" "trig" "rans"))

(setf *testdir*
      (make-pathname :directory
                     (pathname-directory *load-pathname*)))

(defun check (f a b)
  (flet ((as-list (x) 
           (if (compound-data-p x) (coerce (element-seq x) 'list) (list x))))
    (let ((res (as-list (map-elements f a b))))
      (if (member nil res)
	  (format t "test failed in ~s at ckeck ~d~%"
		  *current-test-file* count)))
    (setf count (+ count 1))))

(dolist (f *test-files*)
  (progv '(*current-test-file* count) (list f 1)
	 (load (merge-pathnames f *testdir*))))