cl-scopes/testing.lisp

26 lines
487 B
Common Lisp

;;; cl-scopes/testing
;;;; simple testing library
(defpackage :scopes/testing
(:use :common-lisp)
(:export #:*tst*
#:test-suite #:show-result
#:==))
(in-package :scopes/testing)
(defparameter *tst* nil)
(defclass test-suite ()
((result :initform nil
:accessor result)))
(defun test-suite ()
(make-instance 'test-suite))
(defun show-result ()
(print (result *tst*)))
(defun == (have wanted)
(push (equalp have wanted) (result *tst*)))