- (format t "Error gotten: ~A~%"
- (funcall (symbol-function (find-symbol "VALIDATION-FAILURE-MSG" :docgen)) vf)))
- (error (e) (format t "Error gotten: ~A~%" e))))))
+ (format t "Validation failure gotten: ~A~%"
+ (funcall (symbol-function (find-symbol "VALIDATION-FAILURE-MSG" :docgen)) vf)))))))
+
+(defmacro deffailuretest (pkg source expected)
+ `(deftest
+ ,source
+ (lambda ()
+ (progn
+ (load ,source)
+ (let
+ ((result (docgen:validate-package ,pkg)))
+ (or
+ (equal ,expected result)
+ (format t " Got error:~%~S~% but expected~%~S~%" result ,expected)))))))