debugging output, something weird with multivariate regr.
[CommonLispStat.git] / unittests-lstypes.lisp
blobf4f3acd1ff16d42903f0da59a87d5da178031a42
1 ;;; -*- mode: lisp -*-
3 ;;; File: unittests-lstypes.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 lispstat typing.
8 ;;; Time-stamp: <2008-05-09 14:16:56 tony>
9 ;;; Creation: <2008-05-09 14:16:56 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-types-unittests
24 (:use :common-lisp
25 :lift :lisp-stat-unittests
26 :lisp-stat-types))
28 (in-package :lisp-stat-types-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-types (lisp-stat) ())
38 (addtest (lisp-stat-types) check-one-nonneg-fixnum1
39 (ensure-error
40 ;; (check-one-nonneg-fixnum -3) => error
41 (check-one-nonneg-fixnum -3)))
43 (addtest (lisp-stat-types) check-one-nonneg-fixnum2
44 (ensure
45 ;; (check-one-nonneg-fixnum 3) => 3
46 (= 3
47 (check-one-nonneg-fixnum 3))))
51 ;;; check-one-nonneg-fixnum
53 (addtest (lisp-stat-types) check-nonneg-fixnum1
54 (ensure
55 ;; (check-one-nonneg-fixnum 3) => 3
56 (= 3
57 (check-nonneg-fixnum 3))))
59 (addtest (lisp-stat-types) check-nonneg-fixnum2
60 (ensure
61 ;; (check-one-nonneg-fixnum 3) => 3
62 (equal (list 1 2 3)
63 (check-nonneg-fixnum (list 1 2 3)))))
65 ;;; check-nonneg-fixnum
67 (addtest (lisp-stat-types) check-nonneg-fixnum1
68 (ensure
69 (= 3
70 (check-nonneg-fixnum 3))))
72 (addtest (lisp-stat-types) check-nonneg-fixnum2
73 (ensure
74 (equal (list 1 2 3)
75 (check-nonneg-fixnum (list 1 2 3)))))
77 (addtest (lisp-stat-types) check-nonneg-fixnum3
78 (ensure-error
79 (check-nonneg-fixnum -3)))
81 (addtest (lisp-stat-types) check-nonneg-fixnum4
82 (ensure-error
83 (check-nonneg-fixnum (list 1 2 -3))))
85 ;;;
86 ;; (run-tests)
87 ;; (describe (run-tests))