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