Test case showing correct behaviour for old implementation

This commit is contained in:
Tony Garnock-Jones 2018-04-25 20:08:07 +01:00
parent e7f3dab519
commit 5dd7ec4ae0
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#lang syndicate
;; Test cleanup after exception in stop script
;;
;; Correct output:
;;
;; inner gone
;; outer gone
;; middle gone
;;
;; (or some permutation of these) plus an exception report for the division by zero.
(assertion-struct layer (name))
(spawn (define root-facet (current-facet-id))
(assert (layer 'outer))
(on-start (react (assert (layer 'middle))
(on-start (flush!) (flush!) (stop-facet root-facet))
(on-stop (/ 1 0))
(on-start (react (assert (layer 'inner)))))))
(spawn (on (retracted (layer $x)) (printf "~a gone\n" x)))