2021-06-04 13:56:03 +00:00
|
|
|
;;; SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
;;; SPDX-FileCopyrightText: Copyright © 2010-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
2021-06-01 15:19:24 +00:00
|
|
|
|
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
|
2018-05-06 09:55:02 +00:00
|
|
|
(expected-output (list "1 + 3 = 4")))
|