19 lines
551 B
Common Lisp
19 lines
551 B
Common Lisp
;;;; decons/test-csys - tests for the csys (cybernetic ommunication systems) package
|
|
|
|
(in-package :decons/test-decons)
|
|
|
|
(defun probe (msg state syns env)
|
|
(let ((t:*test-suite* env))
|
|
(== (actor:content msg) (pop state))
|
|
(lambda (msg) (probe msg state syns env))
|
|
))
|
|
|
|
(deftest test-neuron ()
|
|
(let ((prb (csys:neuron #'probe
|
|
:state '(42 43)
|
|
:env t:*test-suite*)))
|
|
(actor:send prb (actor:message 42))
|
|
(actor:send prb (actor:message 43))
|
|
(sleep 0.1)
|
|
(actor:stop prb)
|
|
))
|