network-tests: Factor out a convenient set of states.

This commit is contained in:
Sergiu Ivanov 2020-02-23 15:09:02 +01:00
parent a26ce5aebc
commit ef76e143f2

View file

@ -111,14 +111,15 @@
(let* ([n (nn '((a . (not a)) (b . b)))]
[asyn (make-asyn-dynamics n)]
[syn (make-syn-dynamics n)]
[s (st '((a . #t) (b . #f)))])
[s (st '((a . #t) (b . #f)))]
[ss (set (st '((a . #t) (b . #t)))
(st '((a . #f) (b . #t))))])
(check-equal? (dds-step-one asyn s) (set (st '((a . #f) (b . #f)))
(st '((a . #t) (b . #f)))))
(check-equal? (dds-step-one-annotated asyn s)
(set (cons (set 'b) '#hash((a . #t) (b . #f)))
(cons (set 'a) '#hash((a . #f) (b . #f)))))
(check-equal? (dds-step-one syn s) (set (st '((a . #f) (b . #f)))))
(check-equal? (dds-step asyn (set (st '((a . #t) (b . #t)))
(st '((a . #f) (b . #t)))))
(check-equal? (dds-step asyn ss)
(set (st '((a . #f) (b . #t)))
(st '((a . #t) (b . #t)))))))