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