使用 FiveAM
加载库
(ql:quickload "fiveam")
定义测试用例
(fiveam:test sum-1
(fiveam:is (= 3 (+ 1 2))))
;; We'll also add a failing test case
(fiveam:test sum2
(fiveam:is (= 4 (+ 1 2))))
运行测试
(fiveam:run!)
报道
Running test suite NIL
Running test SUM2 f
Running test SUM1 .
Did 2 checks.
Pass: 1 (50%)
Skip: 0 ( 0%)
Fail: 1 (50%)
Failure Details:
--------------------------------
SUM2 []:
(+ 1 2)
evaluated to
3
which is not
=
to
4
..
--------------------------------
NIL
笔记
- 测试按测试套件分组
- 默认情况下,测试会添加到全局测试套件中