redoing dev style to be more test centric, from lessons learned with lisp-matrix.
[CommonLispStat.git] / src / unittests / unittests-lstypes.lisp
blob7b8be8449f8a6e8cc286e75b68d944cab888e58f
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-10-31 17:39:42 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 :lisp-stat-types-unittests)
20 (deftestsuite lisp-stat-ut-types (lisp-stat-ut) ())
22 (addtest (lisp-stat-ut-types) check-one-nonneg-fixnum1
23 (ensure-error
24 ;; (check-one-nonneg-fixnum -3) => error
25 (check-one-nonneg-fixnum -3)))
27 (addtest (lisp-stat-ut-types) check-one-nonneg-fixnum2
28 (ensure
29 ;; (check-one-nonneg-fixnum 3) => 3
30 (= 3
31 (check-one-nonneg-fixnum 3))))
35 ;;; check-one-nonneg-fixnum
37 (addtest (lisp-stat-ut-types) check-nonneg-fixnum1
38 (ensure
39 ;; (check-one-nonneg-fixnum 3) => 3
40 (= 3
41 (check-nonneg-fixnum 3))))
43 (addtest (lisp-stat-ut-types) check-nonneg-fixnum2
44 (ensure
45 ;; (check-one-nonneg-fixnum 3) => 3
46 (equal (list 1 2 3)
47 (check-nonneg-fixnum (list 1 2 3)))))
49 ;;; check-nonneg-fixnum
51 (addtest (lisp-stat-ut-types) check-nonneg-fixnum1
52 (ensure
53 (= 3
54 (check-nonneg-fixnum 3))))
56 (addtest (lisp-stat-ut-types) check-nonneg-fixnum2
57 (ensure
58 (equal (list 1 2 3)
59 (check-nonneg-fixnum (list 1 2 3)))))
61 (addtest (lisp-stat-ut-types) check-nonneg-fixnum3
62 (ensure-error
63 (check-nonneg-fixnum -3)))
65 (addtest (lisp-stat-ut-types) check-nonneg-fixnum4
66 (ensure-error
67 (check-nonneg-fixnum (list 1 2 -3))))
69 ;;;
70 ;; (run-tests :suite 'lisp-stat-ut-lstypes)
71 ;; (describe (run-tests :suite 'lisp-stat-ut-lstypes))