syndicate-rkt/syndicate/test/core/during-criterion-snapshotti...

18 lines
613 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
;; See .../syndicate/examples/actor/example-during-criterion-shapshotting.rkt
(test-case
[(struct foo (x y) #:prefab)
(spawn (field [x 123])
(assert (foo (x) 999))
(during (foo (x) $v)
(define x0 (x))
2018-04-29 10:55:32 +00:00
(printf "x=~a v=~a\n" (x) v)
(when (= (x) 123) (x 124))
(on-stop
(printf "finally for x0=~a x=~a v=~a\n" x0 (x) v))))]
2018-04-29 10:55:32 +00:00
no-crashes
(expected-output (list "x=123 v=999"
"x=124 v=999"
"finally for x0=123 x=124 v=999")))