26 lines
481 B
Common Lisp
26 lines
481 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)
|
|
|
|
(defvar *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*)))
|