clean up, in prep for removal.
[CommonLispStat.git] / unittests-regression.lisp
blob47d5d1c7200a9e1aab878a08fdb605a116492b0f
1 ;;; -*- mode: lisp -*-
3 ;;; File: unittests-regression.lisp
4 ;;; Author: AJ Rossini <blindglobe@gmail.com>
5 ;;; Copyright: (c)2008, AJ Rossini.
6 ;;; License: BSD, see LICENSE.BSD file for details.
7 ;;; Purpose: unit-tests for regression; also make good examples
8 ;;; Time-stamp: <2008-05-13 17:16:07 tony>
9 ;;; Creation: <2008-05-13 17:16:07 tony>
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
15 ;;; This organization and structure is new to the 21st Century
16 ;;; version.
18 (in-package :cl-user)
20 ;; if needed, but need to set the ASDf path first...!
21 ;; (asdf:oos 'asdf:load-op :lift)
23 (defpackage :lisp-stat-regression-unittests
24 (:use :common-lisp
25 :lift :lisp-stat-unittests
26 :lisp-stat-types))
28 (in-package :lisp-stat-regression-unittests)
30 (defun run-lisp-stat-tests ()
31 (run-tests :suite 'lisp-stat))
33 (defun run-lisp-stat-test (&rest x)
34 (run-test x))
36 (deftestsuite lisp-stat-regression (lisp-stat) ())
39 ;;; setup data tht we need to get this work done.
41 (defvar regr-testdata nil
42 "dataset used for testing")
44 (defvar regr-testdata-iron nil "testvector one")
45 (defvar regr-testdata-alu nil "testvector one")
46 (defvar regr-testdata-othe nil "testvector one")
47 (defvar m1 nil "fitted regr model 1")
48 (defvar m1 nil "fitted regr model 2")
51 ;;; now go to the tests so that we can do the right thing with the
52 ;;; eval.
54 (addtest (lisp-stat-regression) simp-lin-regr1-fit
55 (ensure
56 (progn
57 (setf m1 (regression-model regr-testdat-iron regr-testdat-alu))
58 (equal (list ...)
59 (send m1 :coefs)))))
61 (addtest (lisp-stat-regression) lin-regr1-bomb
62 (ensure-error
63 (check-nonneg-fixnum -3)))
65 ;;;
66 ;; (run-tests)
67 ;; (describe (run-tests))