forked from OdonataResearchLLC/lisp-unit
-
Notifications
You must be signed in to change notification settings - Fork 6
/
package.lisp
96 lines (95 loc) · 2.93 KB
/
package.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
(in-package :cl-user)
(handler-bind
;; fixes sbcl SUPER warnings that prevent automatic fasl loading
;; These are generated when the package definition doesnt match
;; the one currently in the file (eg: removing an export)
((warning (lambda (c)
(format *error-output* "~A~%~S" c c)
(muffle-warning c))))
(defpackage :lisp-unit2
(:use :common-lisp :iter)
;; Print parameters
(:export #:*test-stream*)
;; Forms for assertions
(:export
:assert-eq :assert-eql :assert-equal :assert-equalp
:assert-equality :assert-prints :assert-expands :assert-true
:assert-false :assert-error :assert-no-error
:assert-warning :assert-no-warning
:assert-signal :assert-no-signal
:assert-typep
:assert-string= :assert-string-equal :assert-string/=
:assert-string-not-equal :assert-char= :assert-char-equal
:assert-char/= :assert-char-not-equal :assert= :assert/=
;; floating point
:*measure* :*epsilon* :*significant-figures*
:default-epsilon :sumsq :sump :norm
:relative-error :relative-error-norm
:array-error
:float-equal :assert-float-equal
:sigfig-equal :assert-sigfig-equal
:norm-equal :assert-norm-equal
:number-equal :assert-number-equal
:numerical-equal :assert-numerical-equal
;; rational
:assert-rational-equal :rational-equal
)
;; signals
(:export
:test-start :test-complete :all-tests-start :all-tests-complete
:missing-test :collect-test-results
:assertion-pass :assert-fail)
;; Functions for managing tests
(:export
;; statuses
:errors :failed :warnings :passed :missing :empty
:define-test :*test-db*
:undefine-test
:uninstall-test
:list-tests
:get-tests
:test-code
:test-documentation
:remove-tests
:run-tests
:run-test
:rerun-tests
:rerun-failures
:reset-test-database
:with-test-signals-muffled
:unit-test :*unit-test*
:*results* :*result*
:test-results-db :test-result
:failure-result)
;; Functions for managing tags
(:export
:list-tags
:tagged-tests
:remove-tags)
;; Functions for reporting test results
(:export
:with-summary
:with-summary-context
:with-test-results
:with-test-results-context
:with-assertion-summary
:with-assertion-summary-context
:with-failure-debugging
:with-failure-debugging-context
:test-names
:print-summary
:print-failure-summary
:print-status-summary
:summarize-results
:with-tap-summary
:with-tap-context
:write-tap
:write-tap-to-file
:*result* :*results*)
;; Functions for extensibility via signals
(:export #:assertion-pass #:assertion-fail
#:all-tests-start #:all-tests-complete
#:test-start #:test-complete
:results)
;; Utility predicates
(:export :logically-equal :set-equal)))