syndicate-rkt/syndicate/test/core/simple-addition.rkt

14 lines
455 B
Racket
Raw Normal View History

2020-04-27 18:27:48 +00:00
#lang syndicate/test-implementation
2018-04-29 10:55:32 +00:00
(test-case
[(assertion-struct one-plus (n m))
(spawn #:name 'add1-server
(during/spawn (observe (one-plus $n _))
#:name (list 'solving 'one-plus n)
(assert (one-plus n (+ n 1)))))
(spawn #:name 'client-process
(stop-when (asserted (one-plus 3 $value))
(printf "1 + 3 = ~a\n" value)))]
no-crashes
(expected-output (list "1 + 3 = 4")))