553c1599558eb705809e9f495b77176e8ca8e28e
[fleet.git] / tests / choice / demux-test.fleet
1 // expected output
2 #expect 2
3 #expect 1
4
5 #expect 1
6 #expect 2
7
8 #expect 1
9 #expect 1
10 #expect 2
11
12 #expect 2
13 #expect 2
14 #expect 1
15
16 #expect 2
17 #expect 1
18 #expect 1
19
20 #expect 1
21 #expect 2
22 #expect 2
23
24 // ships required in order to run this code
25 #ship debug        : Debug
26 #ship fifo         : Fifo
27 #ship fifo1        : Fifo
28 #ship fifo2        : Fifo
29 #ship choice       : Choice
30
31 // alternate values from choice1+choice2
32 choice.out1: [*] take, notify fifo1.out;
33 choice.out2: [*] take, notify fifo2.out;
34 debug.in:    [*] take, deliver, notify fifo.out;
35
36 choice.in1: take; [*] deliver;
37 1:          sendto choice.in1;
38
39 // choice.in2 should never be used (FIXME: test this)
40
41 choice.in:  [*] take, deliver;
42
43 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfZero;
44 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfZero;
45 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonZero;
46 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonZero;
47 -1: sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfPositive;
48 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfPositive;
49 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfPositive;
50 -1: sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonPositive;
51 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonPositive;
52 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonPositive;
53 -1: sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNegative;
54 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNegative;
55 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNegative;
56 -1: sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonNegative;
57 0:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonNegative;
58 1:  sendto fifo.in;  fifo.out: wait, take, sendto choice.in.deMuxIfNonNegative;
59 0: sendto fifo.out;
60 fifo.in: [*] take, deliver;
61
62 1: sendto fifo1.in;
63 fifo1.in: take, deliver;
64 fifo1.out: take; [*] wait, sendto debug.in;
65
66 2: sendto fifo2.in;
67 fifo2.in: take, deliver;
68 fifo2.out: take; [*] wait, sendto debug.in;