fix Choice ship tests
[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 fifo.in: [*] take, deliver;
44
45 0:  sendto fifo.in;
46 1:  sendto fifo.in;
47 0:  sendto fifo.in;
48 1:  sendto fifo.in;
49 -1: sendto fifo.in;
50 0:  sendto fifo.in;
51 1:  sendto fifo.in;
52 -1: sendto fifo.in;
53 0:  sendto fifo.in;
54 1:  sendto fifo.in;
55 -1: sendto fifo.in;
56 0:  sendto fifo.in;
57 1:  sendto fifo.in;
58 -1: sendto fifo.in;
59 0:  sendto fifo.in;
60 1:  sendto fifo.in;
61 fifo.out: [2] wait, take, sendto choice.in.deMuxIfZero;
62 fifo.out: [2] wait, take, sendto choice.in.deMuxIfNonZero;
63 fifo.out: [3] wait, take, sendto choice.in.deMuxIfPositive;
64 fifo.out: [3] wait, take, sendto choice.in.deMuxIfNonPositive;
65 fifo.out: [3] wait, take, sendto choice.in.deMuxIfNegative;
66 fifo.out: [3] wait, take, sendto choice.in.deMuxIfNonNegative;
67 0: sendto fifo.out;
68
69 1: sendto fifo1.in;
70 fifo1.in: take, deliver;
71 fifo1.out: take; [*] wait, sendto debug.in;
72
73 2: sendto fifo2.in;
74 fifo2.in: take, deliver;
75 fifo2.out: take; [*] wait, sendto debug.in;