8c06239f74e8ebc92c8a866dfa626aaad02f257e
[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 :fiveam)
23   (:export ;; creating tests and test-suites
24            #:make-suite
25            #:def-suite
26            #:in-suite
27            #:in-suite*
28            #:make-test
29            #:test
30            #:get-test
31            #:rem-test
32            #:test-names
33            ;; fixtures
34            #:make-fixture
35            #:def-fixture
36            #:with-fixture
37            #:get-fixture
38            #:rem-fixture
39            ;; running checks
40            #:is
41            #:is-every
42            #:is-true
43            #:is-false
44            #:signals
45            #:finishes
46            #:skip
47            #:pass
48            #:fail
49            #:*test-dribble*
50            #:for-all
51            #:gen-integer
52            #:gen-float
53            #:gen-character
54            #:gen-string
55            #:gen-list
56            #:gen-tree
57            #:gen-buffer
58            #:gen-one-element
59            ;; running tests
60            #:run
61            #:run-all-tests
62            #:explain
63            #:explain!
64            #:run!
65            #:debug!
66            #:!
67            #:!!
68            #:!!!
69            #:*run-test-when-defined*
70            #:*debug-on-error*
71            #:*debug-on-failure*
72            #:*verbose-failures*))
73
74 ;;;; You can use #+5am to put your test-defining code inline with your
75 ;;;; other code - and not require people to have fiveam to run your
76 ;;;; package.
77
78 (pushnew :5am *features*)
79
80 ;;;;@include "check.lisp"
81
82 ;;;;@include "random.lisp"
83
84 ;;;;@include "fixture.lisp"
85
86 ;;;;@include "test.lisp"
87
88 ;;;;@include "suite.lisp"
89
90 ;;;;@include "run.lisp"
91
92 ;;;;@include "explain.lisp"
93
94 ;;;; * Colophon
95
96 ;;;; This documentaion was written by Edward Marco Baringer
97 ;;;; <mb@bese.it> and generated by qbook.
98
99 ;;;; ** COPYRIGHT
100
101 ;;;; Copyright (c) 2002-2003, Edward Marco Baringer
102 ;;;; All rights reserved. 
103  
104 ;;;; Redistribution and use in source and binary forms, with or without
105 ;;;; modification, are permitted provided that the following conditions are
106 ;;;; met:
107  
108 ;;;;  - Redistributions of source code must retain the above copyright
109 ;;;;    notice, this list of conditions and the following disclaimer.
110  
111 ;;;;  - Redistributions in binary form must reproduce the above copyright
112 ;;;;    notice, this list of conditions and the following disclaimer in the
113 ;;;;    documentation and/or other materials provided with the distribution.
114
115 ;;;;  - Neither the name of Edward Marco Baringer, nor BESE, nor the names
116 ;;;;    of its contributors may be used to endorse or promote products
117 ;;;;    derived from this software without specific prior written permission.
118  
119 ;;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
120 ;;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
121 ;;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
122 ;;;; A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
123 ;;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
124 ;;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
125 ;;;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
126 ;;;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
127 ;;;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
128 ;;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
129 ;;;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE