X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests.lisp;h=922591119946cc2189a58e8ea6c5bd75aa14adb2;hb=f67db194b4ffb7d673feb50dc0e152274c14cd76;hp=b91520c21475bd273529b655bbb147c3c32473c7;hpb=626d4ad3a850e199e5b4a472c06ae92532c82ac8;p=xlunit.git diff --git a/tests.lisp b/tests.lisp index b91520c..9225911 100644 --- a/tests.lisp +++ b/tests.lisp @@ -2,7 +2,7 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Id: $Id: tests.lisp,v 1.12 2003/08/06 11:37:23 kevin Exp $ +;;;; Id: $Id$ ;;;; Purpose: Self Test suite for XLUnit ;;;; ;;;; ************************************************************************* @@ -13,6 +13,9 @@ (:export #:do-tests)) (in-package #:xlunit-tests) +(define-condition test-condition (error) + ()) + ;; Helper test fixture @@ -43,6 +46,14 @@ (def-test-method test-error-method ((self was-run) :run nil) (error "Err")) +(def-test-method test-condition-without-cond ((self was-run) :run nil) + (assert-condition 'error (list 'no-error))) + +#+ignore +(def-test-method test-not-condition-with-cond ((self was-run) :run nil) + (assert-not-condition 'test-condition + (signal 'test-condition))) + ;;; Second helper test case @@ -113,7 +124,32 @@ (assert-equal "2 run, 0 erred, 0 failed" (summary (run (get-suite test-two-cases))))) +(def-test-method test-condition ((self test-case-test) :run nil) + (assert-condition + 'test-condition + (error 'test-condition))) + +(def-test-method test-condition-without-cond ((self test-case-test) + :run nil) + (assert-equal "1 run, 0 erred, 1 failed" + (summary (run + (named-test 'test-condition-without-cond + (get-suite was-run)))))) + +#+ignore +(def-test-method test-not-condition ((self test-case-test) :run nil) + (assert-not-condition + 'test-condition + (progn))) +#+ignore +(def-test-method test-not-condition-with-cond ((self test-case-test) + :run nil) + (assert-equal "1 run, 0 erred, 1 failed" + (summary (run + (named-test 'test-not-condition-with-cond + (get-suite was-run)))))) + (textui-test-run (get-suite test-case-test))