cl-scopes/testing.lisp

20 lines
409 B
Common Lisp

;;; cl-scopes/testing
;;;; simple testing library
(defpackage :scopes/testing
(:use :common-lisp)
(:export #:test-suite #:assert-eq #:result))
(in-package :scopes/testing)
(defclass test-suite ()
((result :initform nil
:reader result
:accessor result!)))
(defun test-suite ()
(make-instance 'test-suite))
(defun assert-eq (tst have wanted)
(push (equalp have wanted) (result! tst)))