7828de513b1966bad76db88c512b8c4aa89b4df6
[fiveam.git] / src / packages.lisp
1 ;; -*- lisp -*-
2
3 ;;;; * Introduction
4
5 ;;;; FiveAM is a testing framework. It takes care of all the boring
6 ;;;; bookkeeping associated with managing a test framework allowing
7 ;;;; the developer to focus on writing tests and code.
8
9 ;;;; FiveAM was designed with the following premises:
10
11 ;;;; - Defining tests should be about writing tests, not
12 ;;;; infrastructure. The developer should be able to focus on what
13 ;;;; they're testing, not the testing framework.
14
15 ;;;; - Interactive testing is the norm. Common Lisp is an interactive
16 ;;;; development environment, the testing environment should allow the
17 ;;;; developer to quickly and easily redefine, change, remove and run
18 ;;;; tests.
19
20 (defpackage :it.bese.FiveAM
21   (:use :common-lisp :it.bese.arnesi)
22   (:nicknames :5am)
23   (:export ;; creating tests and test-suites
24            #:make-suite
25            #:def-suite
26            #:in-suite
27            #:make-test
28            #:test
29            #:get-test
30            #:rem-test
31            ;; fixtures
32            #:make-fixture
33            #:def-fixture
34            #:with-fixture
35            #:get-fixture
36            #:rem-fixture
37            ;; running checks
38            #:is
39            #:is-true
40            #:is-false
41            #:signals
42            #:finishes
43            #:skip
44            #:pass
45            #:fail
46            #:*test-dribble*
47            #:for-all
48            #:gen-integer
49            #:gen-float
50            #:gen-character
51            #:gen-string
52            #:gen-list
53            #:gen-buffer
54            ;; running tests
55            #:run
56            #:run-all-tests
57            #:explain
58            #:explain!
59            #:run!
60            #:!
61            #:!!
62            #:!!!
63            #:*run-test-when-defined*
64            #:*debug-on-error*
65            #:*debug-on-failure*
66            #:*verbose-failures*))
67
68 ;;;; You can use #+5am to put your test-defining code inline with your
69 ;;;; other code - and not require people to have fiveam to run your
70 ;;;; package.
71
72 (pushnew :5am *features*)
73
74 ;;;;@include "check.lisp"
75
76 ;;;;@include "random.lisp"
77
78 ;;;;@include "fixture.lisp"
79
80 ;;;;@include "test.lisp"
81
82 ;;;;@include "suite.lisp"
83
84 ;;;;@include "run.lisp"
85
86 ;;;;@include "explain.lisp"
87
88 ;;;; * Colophon
89
90 ;;;; This documentaion was written by Edward Marco Baringer
91 ;;;; <mb@bese.it> and generated by qbook.
92
93 ;;;; ** COPYRIGHT
94
95 ;;;; Copyright (c) 2002-2003, Edward Marco Baringer
96 ;;;; All rights reserved. 
97  
98 ;;;; Redistribution and use in source and binary forms, with or without
99 ;;;; modification, are permitted provided that the following conditions are
100 ;;;; met:
101  
102 ;;;;  - Redistributions of source code must retain the above copyright
103 ;;;;    notice, this list of conditions and the following disclaimer.
104  
105 ;;;;  - Redistributions in binary form must reproduce the above copyright
106 ;;;;    notice, this list of conditions and the following disclaimer in the
107 ;;;;    documentation and/or other materials provided with the distribution.
108
109 ;;;;  - Neither the name of Edward Marco Baringer, nor BESE, nor the names
110 ;;;;    of its contributors may be used to endorse or promote products
111 ;;;;    derived from this software without specific prior written permission.
112  
113 ;;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
114 ;;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
115 ;;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
116 ;;;; A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
117 ;;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
118 ;;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
119 ;;;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
120 ;;;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
121 ;;;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
122 ;;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
123 ;;;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE