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