X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests.lisp;h=b14b68919525d47c85ef211e0af7b1c7f7dd9800;hb=8e9bc32063b4197e64863afa179ba09e85737a05;hp=60daebf30bd0f7de9d777e8515ac238b92dc007b;hpb=77e80d4f7d2d8a1aea36f9239abc7e1b25500ecc;p=xlunit.git diff --git a/tests.lisp b/tests.lisp index 60daebf..b14b689 100644 --- a/tests.lisp +++ b/tests.lisp @@ -2,7 +2,7 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Id: $Id: tests.lisp,v 1.13 2003/08/06 14:51:01 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,14 +124,33 @@ (assert-equal "2 run, 0 erred, 0 failed" (summary (run (get-suite test-two-cases))))) -(define-condition test-condition (error) - ()) - (def-test-method test-condition ((self test-case-test) :run nil) (assert-condition - test-condition - (error (make-instance 'test-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)))))) + +#+ignore (textui-test-run (get-suite test-case-test))