Modify test running system
[jscl.git] / tests.lisp
diff --git a/tests.lisp b/tests.lisp
new file mode 100644 (file)
index 0000000..b230068
--- /dev/null
@@ -0,0 +1,15 @@
+(defvar *passed-tets* 0)
+(defvar *failed-tets* 0)
+(defvar *timestamp* (get-internal-real-time))
+
+(defmacro test (condition)
+  `(cond
+     (,condition
+      (write-line ,(concat "Test `" (prin1-to-string condition) "' passed"))
+      (incf *passed-tets*))
+     (t
+      (write-line ,(concat "Test `" (prin1-to-string condition) "' failed."))
+      (incf *failed-tets*))))
+
+(write-line "Running tests...")
+(write-line "")