;;;; 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 :env t:*test-suite* :state '(42 43))) (fw (csys:neuron #'csys:forward :syns (list (csys:synapse prb))))) (actor:send fw (actor:message 42)) (actor:send fw (actor:message 43)) (sleep 0.1) (actor:stop prb) (actor:stop fw) ))