X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests.lisp;h=65b4ae2021560e8162e53115e8f06b31344af2f3;hb=b80d28ea6387828e6a095ffa835b9b631c5749ea;hp=6fce25e807f9a4b880ae560c93f49be8eaa834a2;hpb=1cd3b2403660569e2983ce646fbf0d364fbfefe5;p=jscl.git diff --git a/tests.lisp b/tests.lisp index 6fce25e..65b4ae2 100644 --- a/tests.lisp +++ b/tests.lisp @@ -1,9 +1,11 @@ -(defvar *total-tests* 0) -(defvar *passed-tests* 0) -(defvar *failed-tests* 0) +(defparameter *total-tests* 0) +(defparameter *passed-tests* 0) +(defparameter *failed-tests* 0) +(defparameter *expected-failures* 0) +(defparameter *unexpected-passes* 0) -(defvar *expected-failures* 0) -(defvar *unexpected-passes* 0) +(defvar *use-html-output-p* t) +(defun if-html (string) (if *use-html-output-p* string "")) (defvar *timestamp* nil) @@ -14,9 +16,11 @@ (write-line ,(concat "Test `" (prin1-to-string condition) "' passed")) (incf *passed-tests*)) (t - (write-line ,(concat "Test `" - (prin1-to-string condition) - "' failed.")) + (write-line (concat (if-html "") + "Test `" + ,(prin1-to-string condition) + "' failed." + (if-html ""))) (incf *failed-tests*))) (incf *total-tests*))) @@ -24,9 +28,11 @@ `(progn (cond (,condition - (write-line ,(concat "Test `" - (prin1-to-string condition) - "' passed unexpectedly!")) + (write-line (concat (if-html "") + "Test `" + ,(prin1-to-string condition) + "' passed unexpectedly!" + (if-html ""))) (incf *unexpected-passes*)) (t (write-line ,(concat "Test `" (prin1-to-string condition) "' failed expectedly."))