Kind | Covered | All | % |
expression | 0 | 7 | 0.0 |
branch | 0 | 0 | nil |
1
;;; pkg.lisp --- regression testing packages
2
3
;; Regression Testing framework. inspired by PCL, the original CMUCL
4
;; code, and the SBCL port.
5
6
;;; Commentary:
7
8
;; - :rt https://www.merl.com/publications/docs/TR91-04.pdf Chapter 1
9
;; - :com.gigamonkeys.test https://github.com/gigamonkey/monkeylib-test-framework
10
;; - :sb-rt https://github.com/sbcl/sbcl/blob/master/contrib/sb-rt/rt.lisp
11
12
;; This package is intended to provide a modernized Lisp testing
13
;; library with features found in some of the test frameworks listed
14
;; below.
15
16
;; - :it.bese.fiveam https://github.com/lispci/fiveam
17
;; - :try https://github.com/melisgl/try
18
;; - :rove https://github.com/fukamachi/rove
19
20
;;; TODO:
21
#|
22
23
- [ ] benchmark support: do-bench, test-count,
24
25
- [ ] fixtures api
26
27
- [ ] profiling
28
|#
29
;;; Code:
30
(in-package :std-user)
31
32
(defpackage :rt
33
(:use
34
:cl :std :sxp :log :obj/ast
35
:sb-aprof)
36
(:export
37
:test-error
38
:*compile-tests*
39
:*catch-test-errors*
40
:*test-suffix*
41
:*default-test-suite-name*
42
:*test-suite*
43
:*test-suite-list*
44
;; TODO 2023-09-04: :*test-profiler-list* not yet
45
:*testing*
46
:test-declare
47
:test-policy
48
:test-suite-designator
49
:check-suite-designator
50
:make-test
51
:make-suite
52
:test-name=
53
:do-test
54
:do-tests
55
:reset-tests
56
:continue-testing
57
:with-test-env
58
:%test-bail
59
:%test-result
60
:make-test-result
61
:ensure-suite
62
:fixture
63
:fixture-prototype
64
:make-fixture-prototype
65
:make-fixture
66
:with-fixture
67
:tmp-fixture
68
:test-result
69
:test-fn
70
:test-pass-p
71
:test-fail-p
72
:test-skip-p
73
:test-failed
74
:fail!
75
:is
76
:signals
77
:deftest
78
:defsuite
79
:in-suite
80
:eval-test
81
:compile-test
82
:locked-tests
83
:push-test
84
:pop-test
85
:delete-test
86
:find-test
87
:find-suite
88
:do-suite
89
:test-object
90
:test
91
:test-fixture
92
:test-suite
93
:tests
94
:test-form
95
:test-results
96
:*tmp*
97
:*default-tmp-directory*
98
:with-tmp-directory
99
:with-tmp-file
100
:isnt
101
:is=
102
:iseq
103
:iseql
104
:isequalp
105
:isequal
106
:isand
107
:isempty
108
:istype
109
:issubtype
110
:issubclass
111
:iszero
112
:isevery
113
:issome
114
:islist
115
:test-fixtures
116
:*fx*
117
:*fixtures*
118
:*test-policy*
119
:is>
120
:is<
121
:is>=
122
:is<=
123
:isor
124
:run-all-tests))
125
126
(defpackage :rt/bench
127
(:nicknames :bench)
128
(:use :cl :std :log :rt)
129
(:export
130
:*bench-count*
131
:defbench
132
:do-bench
133
:bench
134
:time-total))
135
136
(defpkg :rt/cover
137
(:nicknames :cover)
138
(:use :cl :std :log :rt)
139
(:use-reexport :sb-cover)
140
(:export
141
:enable-coverage :disable-coverage
142
:*coverage-directory*
143
:coverage-report))
144
145
(defpackage :rt/tracing
146
(:nicknames :tracing)
147
(:use :cl :std :log :rt)
148
(:export
149
:start-tracing
150
:stop-tracing
151
:with-tracing
152
:save-report
153
;; Extra utility
154
:package-symbols-except))
155
156
(defpackage :rt/flamegraph
157
(:nicknames :flamegraph)
158
(:use :cl :std :log :rt)
159
(:export :with-flamegraph))
160
161
(defpackage :rt/fuzz
162
(:nicknames :fuzz)
163
(:use :cl :std :log :rt)
164
(:export :fuzzer
165
:fuzz
166
:fuzz*
167
:fuzz-generator
168
:fuzz-state))