;;;; *************************************************************************
;;;; 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
;;;;
;;;; *************************************************************************
(: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)))))
-(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))