File: test.lsp

package info (click to toggle)
xlispstat 3.52.14-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 7,560 kB
  • ctags: 12,676
  • sloc: ansic: 91,357; lisp: 21,759; sh: 1,525; makefile: 521; csh: 1
file content (24 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(setf *test-files*
      (list "arith" "complex" "manip" "matrix" "matrix2" "blas"
	    "math" "prob" "trig" "rans"))

(setf *testdir*
      (make-pathname :directory (pathname-directory *load-pathname*)
		     :device (pathname-device *load-pathname*)
		     :host (pathname-device *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*))))