1 (in-package #:lift-test
)
3 ;;; ---------------------------------------------------------------------------
5 ;;; make sure that ensure and its friends work as expected
7 ;;; The strategy here is to pair "regular" tests with meta-tests. The
8 ;;; regular tests are normal tests written using LIFT. The meta-tests
9 ;;; use run-tests or run-tests to run the regular test and then grovel
10 ;;; over the returned test-result to make sure it contains what it is
12 ;;; ---------------------------------------------------------------------------
14 (defpackage #:one-test-package
15 (:use
#:common-lisp
#:lift
))
17 (defpackage #:two-test-package
18 (:use
#:common-lisp
#:lift
))
20 (deftestsuite one-test-package
::test-finding
() ())
22 (deftestsuite two-test-package
::test-finding
() ())
24 (deftestsuite test-find-test-suite
(lift-test) ())
26 (addtest (test-find-test-suite)
28 (ensure-same (lift::find-testsuite
'test-find-test-suite
)
29 'test-find-test-suite
)
30 (ensure-same (lift::find-testsuite
'one-test-package
::test-finding
)
31 'one-test-package
::test-finding
)
32 (ensure-same (lift::find-testsuite
'two-test-package
::test-finding
)
33 'two-test-package
::test-finding
))
35 (addtest (test-find-test-suite)
37 (ensure-condition lift
::test-class-not-defined
38 (lift::find-testsuite
(gensym))))
40 (addtest (test-find-test-suite)
42 (ensure-error (lift::find-testsuite
"test-finding")))