improved packaging in anticipatin for correcting my split of packages.
[CommonLispStat.git] / src / unittests / unittests-lstypes.lisp
bloba31f3e861886347af3c529320ac2e4813abb0c8c
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-28 08:25:28 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)
31 (deftestsuite lisp-stat-ut-types (lisp-stat-ut) ())
33 (addtest (lisp-stat-ut-types) check-one-nonneg-fixnum1
34 (ensure-error
35 ;; (check-one-nonneg-fixnum -3) => error
36 (check-one-nonneg-fixnum -3)))
38 (addtest (lisp-stat-ut-types) check-one-nonneg-fixnum2
39 (ensure
40 ;; (check-one-nonneg-fixnum 3) => 3
41 (= 3
42 (check-one-nonneg-fixnum 3))))
46 ;;; check-one-nonneg-fixnum
48 (addtest (lisp-stat-ut-types) check-nonneg-fixnum1
49 (ensure
50 ;; (check-one-nonneg-fixnum 3) => 3
51 (= 3
52 (check-nonneg-fixnum 3))))
54 (addtest (lisp-stat-ut-types) check-nonneg-fixnum2
55 (ensure
56 ;; (check-one-nonneg-fixnum 3) => 3
57 (equal (list 1 2 3)
58 (check-nonneg-fixnum (list 1 2 3)))))
60 ;;; check-nonneg-fixnum
62 (addtest (lisp-stat-ut-types) check-nonneg-fixnum1
63 (ensure
64 (= 3
65 (check-nonneg-fixnum 3))))
67 (addtest (lisp-stat-ut-types) check-nonneg-fixnum2
68 (ensure
69 (equal (list 1 2 3)
70 (check-nonneg-fixnum (list 1 2 3)))))
72 (addtest (lisp-stat-ut-types) check-nonneg-fixnum3
73 (ensure-error
74 (check-nonneg-fixnum -3)))
76 (addtest (lisp-stat-ut-types) check-nonneg-fixnum4
77 (ensure-error
78 (check-nonneg-fixnum (list 1 2 -3))))
80 ;;;
81 ;; (run-tests :suite 'lisp-stat-ut-lstypes)
82 ;; (describe (run-tests :suite 'lisp-stat-ut-lstypes))