fixup test
This commit is contained in:
parent
5c8986bddd
commit
a2780484be
|
@ -3,3 +3,8 @@
|
||||||
(define racket-launcher-names '("syndicate-broker" "syndicate-render-msd"))
|
(define racket-launcher-names '("syndicate-broker" "syndicate-render-msd"))
|
||||||
(define racket-launcher-libraries '("broker/server.rkt" "trace/render-msd.rkt"))
|
(define racket-launcher-libraries '("broker/server.rkt" "trace/render-msd.rkt"))
|
||||||
(define test-include-paths '("syndicate/tests"))
|
(define test-include-paths '("syndicate/tests"))
|
||||||
|
(define test-omit-paths
|
||||||
|
'(;; Sam: example-plain is interactive, I think
|
||||||
|
"examples/example-plain.rkt"
|
||||||
|
;; Sam: for whatever reason I get a failure to load libcrypto for f-to-c
|
||||||
|
"examples/actor/f-to-c.rkt"))
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#lang syndicate/test
|
#lang syndicate/test
|
||||||
|
|
||||||
;; Reflects the current behavior of the little implementation,
|
;; The facet in the on-stop should immediately die and its assertion should never be visible.
|
||||||
;; but quite possibly *not* what should happen
|
;; Pretty sure the little implementation gets that wrong.
|
||||||
|
;; the trace does not have a way of saying there should never be a "here" assertion
|
||||||
|
|
||||||
(spawn
|
(spawn
|
||||||
(on-stop (react (assert (outbound "here"))))
|
(on-stop (react (assert (outbound "here"))))
|
||||||
|
@ -9,4 +10,4 @@
|
||||||
|
|
||||||
(spawn (on-start (send! "stop")))
|
(spawn (on-start (send! "stop")))
|
||||||
|
|
||||||
(trace (assertion-added (outbound "here")))
|
(trace (message "stop"))
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
;; dubious behavior by little implementation;
|
;; dubious behavior by little implementation;
|
||||||
;; create new facets from more nested facets
|
;; create new facets from more nested facets
|
||||||
|
|
||||||
|
;; The facet in the on-stop should immediately die and its assertion should never be visible.
|
||||||
|
;; Pretty sure the little implementation gets that wrong.
|
||||||
|
;; the trace does not have a way of saying there should never be an "inner" assertion
|
||||||
|
|
||||||
(spawn (on-start
|
(spawn (on-start
|
||||||
(react (on-stop
|
(react (on-stop
|
||||||
(react (assert (outbound "inner"))))))
|
(react (assert (outbound "inner"))))))
|
||||||
|
@ -13,4 +17,4 @@
|
||||||
|
|
||||||
(spawn (on-start (send! "stop")))
|
(spawn (on-start (send! "stop")))
|
||||||
|
|
||||||
(trace (assertion-added (outbound "inner")))
|
(trace (message "stop"))
|
||||||
|
|
|
@ -77,11 +77,13 @@
|
||||||
(start-facet x
|
(start-facet x
|
||||||
(on (retracted (observe (quote title discard)))
|
(on (retracted (observe (quote title discard)))
|
||||||
(stop x))
|
(stop x))
|
||||||
(match title
|
(define answer
|
||||||
["Catch 22"
|
(match title
|
||||||
(assert (quote title (price 22)))]
|
["Catch 22"
|
||||||
[discard
|
(price 22)]
|
||||||
(assert (quote title (out-of-stock)))])))
|
[_
|
||||||
|
(out-of-stock)]))
|
||||||
|
(assert (quote title answer))))
|
||||||
(on (asserted (observe (order (bind title String) (bind offer Int) discard discard)))
|
(on (asserted (observe (order (bind title String) (bind offer Int) discard discard)))
|
||||||
(start-facet x
|
(start-facet x
|
||||||
(on (retracted (observe (order title offer discard discard)))
|
(on (retracted (observe (order title offer discard discard)))
|
||||||
|
|
Loading…
Reference in New Issue