[mcclim-cvs] CVS mcclim/Tests

crhodes crhodes at common-lisp.net
Fri Apr 21 12:03:23 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Tests
In directory clnet:/tmp/cvs-serv30320/Tests

Modified Files:
	commands.lisp 
Added Files:
	input-editing.lisp 
Log Message:
the command-table-error subclasses must handle :format-control and 
:format-arguments.  Make it so, and test for it (and also test that not 
passing them doesn't lead to an unprintable condition.

New test file input-editing, for an invariant I spotted while browsing.


--- /project/mcclim/cvsroot/mcclim/Tests/commands.lisp	2006/03/23 17:03:40	1.3
+++ /project/mcclim/cvsroot/mcclim/Tests/commands.lisp	2006/04/21 12:03:23	1.4
@@ -50,3 +50,23 @@
                                                'removal-test-table)
           (command-not-present () t)
           (:no-error (x) (declare (ignore x)) nil)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; command table errors (see 27.2)
+(assert (subtypep 'command-table-error 'error))
+(assert (subtypep 'command-table-not-found 'command-table-error))
+(assert (subtypep 'command-table-already-exists 'command-table-error))
+(assert (subtypep 'command-not-present 'command-table-error))
+(assert (subtypep 'command-not-accessible 'command-table-error))
+(assert (subtypep 'command-already-present 'command-table-error))
+
+(let ((condition (make-condition 'command-table-error 
+                                 :format-control "~A" 
+                                 :format-arguments '(!))))
+  (assert (find #\! (format nil "~A" condition))))
+;;; not actually required to DTRT here, but we use this form (without
+;;; control and arguments) internally, so make sure that we don't
+;;; error out recursively when in the debugger with one of these.
+(let ((condition (make-condition 'command-not-present)))
+  (format nil "~A" condition))

--- /project/mcclim/cvsroot/mcclim/Tests/input-editing.lisp	2006/04/21 12:03:23	NONE
+++ /project/mcclim/cvsroot/mcclim/Tests/input-editing.lisp	2006/04/21 12:03:23	1.1
(defpackage :clim-tests
  (:use :clim-lisp :clim))

(in-package :clim-tests)

(assert (null *activation-gestures*))



More information about the Mcclim-cvs mailing list