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
20 ;; if needed, but need to set the ASDf path first...!
21 ;; (asdf:oos 'asdf:load-op :lift)
23 (defpackage :lisp-stat-types-unittests
25 :lift
:lisp-stat-unittests
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
)
36 (deftestsuite lisp-stat-types
(lisp-stat) ())
38 (addtest (lisp-stat-types) check-one-nonneg-fixnum1
40 ;; (check-one-nonneg-fixnum -3) => error
41 (check-one-nonneg-fixnum -
3)))
43 (addtest (lisp-stat-types) check-one-nonneg-fixnum2
45 ;; (check-one-nonneg-fixnum 3) => 3
47 (check-one-nonneg-fixnum 3))))
51 ;;; check-one-nonneg-fixnum
53 (addtest (lisp-stat-types) check-nonneg-fixnum1
55 ;; (check-one-nonneg-fixnum 3) => 3
57 (check-nonneg-fixnum 3))))
59 (addtest (lisp-stat-types) check-nonneg-fixnum2
61 ;; (check-one-nonneg-fixnum 3) => 3
63 (check-nonneg-fixnum (list 1 2 3)))))
65 ;;; check-nonneg-fixnum
67 (addtest (lisp-stat-types) check-nonneg-fixnum1
70 (check-nonneg-fixnum 3))))
72 (addtest (lisp-stat-types) check-nonneg-fixnum2
75 (check-nonneg-fixnum (list 1 2 3)))))
77 (addtest (lisp-stat-types) check-nonneg-fixnum3
79 (check-nonneg-fixnum -
3)))
81 (addtest (lisp-stat-types) check-nonneg-fixnum4
83 (check-nonneg-fixnum (list 1 2 -
3))))
87 ;; (describe (run-tests))