33 lines
955 B
Common Lisp
33 lines
955 B
Common Lisp
;;;; cl-scopes/test-core - testing for the scopes-core system.
|
|
|
|
(defpackage :scopes/test-core
|
|
(:use :common-lisp)
|
|
(:local-nicknames (:config :scopes/config)
|
|
(:core :scopes/core)
|
|
(:util :scopes/util)
|
|
(:t :scopes/testing))
|
|
(:export #:run #:user #:password)
|
|
(:import-from :scopes/testing #:deftest #:==))
|
|
|
|
(in-package :scopes/test-core)
|
|
|
|
(defvar *config* nil)
|
|
|
|
(defclass test-suite (t:test-suite)
|
|
((receiver :reader receiver
|
|
:initform (core:printer :test-rcvr))))
|
|
;:initform (make-instance 't:test-rcvr))))
|
|
|
|
(defun run ()
|
|
(let ((*config* nil)
|
|
(t:*test-suite* (make-instance 'test-suite :name "core")))
|
|
(load (t:test-path "config-core" "etc"))
|
|
(test-send)
|
|
(t:show-result)))
|
|
|
|
(t:deftest test-send ()
|
|
(let ((rcvr (receiver t:*test-suite*))
|
|
(msg "dummy message"))
|
|
(== (core:name rcvr) :test-rcvr)
|
|
(core:send rcvr msg)
|
|
))
|