r8702: Automated commit for Debian build of xlunit upstream-version-0.6.2
[xlunit.git] / tests.lisp
index b91520c21475bd273529b655bbb147c3c32473c7..b14b68919525d47c85ef211e0af7b1c7f7dd9800 100644 (file)
@@ -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
 
 (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
 
   (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))))))
+               
+#+ignore    
 (textui-test-run (get-suite test-case-test))