forked from steelbreeze/state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmp.txt
336 lines (308 loc) · 11.9 KB
/
tmp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
> @steelbreeze/[email protected] test
> nyc --reporter=lcov mocha
instance enter model
instance enter model.default
instance enter model.default.initial
instance leave model.default.initial
instance enter model.default.stateA
instance evaluate {"fieldA":1,"fieldB":2}
instance deferring {"fieldA":1,"fieldB":2}
instance evaluate deferred {"fieldA":1,"fieldB":2}
instance leave model.default.stateA
instance enter model.default.stateB
hellkow B
p3pp3r enter model
p3pp3r enter model.region
p3pp3r enter model.region.initial
p3pp3r leave model.region.initial
p3pp3r enter model.region.state1
p3pp3r enter model.region.state1.regionA
p3pp3r enter model.region.state1.regionA.initialA
p3pp3r leave model.region.state1.regionA.initialA
p3pp3r enter model.region.state1.regionA.state3
p3pp3r enter model.region.state1.regionB
p3pp3r enter model.region.state1.regionB.initialB
p3pp3r leave model.region.state1.regionB.initialB
p3pp3r enter model.region.state1.regionB.state4
p3pp3r enter model.region.state1.regionB.state4.regionBa
p3pp3r enter model.region.state1.regionB.state4.regionBa.initialBa
p3pp3r leave model.region.state1.regionB.state4.regionBa.initialBa
p3pp3r enter model.region.state1.regionB.state4.regionBa.state6
p3pp3r enter model.region.state1.regionB.state4.regionBb
p3pp3r enter model.region.state1.regionB.state4.regionBb.initialBb
p3pp3r leave model.region.state1.regionB.state4.regionBb.initialBb
p3pp3r enter model.region.state1.regionB.state4.regionBb.state7
params enter model
params enter model.default
params enter model.default.initial
params leave model.default.initial
params enter model.default.first
params evaluate [object Object]
params leave model.default.first
params enter model.default.second
redboltz1 enter model
redboltz1 enter model.region
redboltz1 enter model.region.initial
redboltz1 leave model.region.initial
redboltz1 enter model.region.state1
redboltz1 evaluate event1a
redboltz1 deferring event1a
redboltz1 evaluate event1b
redboltz1 deferring event1b
redboltz1 evaluate event2a
redboltz1 leave model.region.state1
redboltz1 enter model.region.state2
redboltz1 evaluate event2b
redboltz1 leave model.region.state2
redboltz1 enter model.region.state3
redboltz1 evaluate deferred event1a
redboltz1 leave model.region.state3
redboltz1 enter model.region.state4
redboltz1 evaluate deferred event1b
redboltz1 leave model.region.state4
redboltz1 enter model.region.state5
redboltz2 enter model
redboltz2 enter model.region
redboltz2 enter model.region.initial
redboltz2 leave model.region.initial
redboltz2 enter model.region.state1
redboltz2 evaluate event1
redboltz2 deferring event1
redboltz2 evaluate event2
redboltz2 leave model.region.state1
redboltz2 enter model.region.state2
redboltz2 leave model.region.state2
redboltz2 enter model.region.state3
redboltz2 evaluate deferred event1
redboltz2 leave model.region.state3
redboltz2 enter model.region.state4
redboltz3 enter model
redboltz3 enter model.region
redboltz3 enter model.region.initial
redboltz3 leave model.region.initial
redboltz3 enter model.region.s1
redboltz3 evaluate e1
redboltz3 deferring e1
redboltz3 evaluate e2
redboltz3 deferring e2
redboltz3 evaluate e3
redboltz3 deferring e3
redboltz3 evaluate e4
redboltz3 leave model.region.s1
redboltz3 enter model.region.s2
redboltz3 evaluate deferred e2
redboltz3 leave model.region.s2
redboltz3 enter model.region.s3
redboltz3 evaluate deferred e1
redboltz3 leave model.region.s3
redboltz3 enter model.region.s4
redboltz3 evaluate deferred e3
second-pass enter model
second-pass enter model.default
second-pass enter model.default.initial
second-pass leave model.default.initial
second-pass enter model.default.identify
second-pass evaluate Continue
second-pass leave model.default.identify
second-pass enter model.default.exception_1
second-pass evaluate No
second-pass leave model.default.exception_1
second-pass enter model.default.A
second-pass enter model.default.A.default
second-pass enter model.default.A.default.A_initial
second-pass leave model.default.A.default.A_initial
second-pass enter model.default.A.default.A_1
second-pass evaluate Yes
second-pass leave model.default.A.default.A_1
second-pass enter model.default.A.default.A_2
second-pass evaluate Yes
second-pass leave model.default.A.default.A_2
second-pass enter model.default.A.default.A_pass
second-pass leave model.default.A.default.A_pass
second-pass leave model.default.A.default
second-pass leave model.default.A
second-pass enter model.default.model_pass
second-pass leave model.default.model_pass
second-pass enter model.default.identify
second-pass evaluate Continue
second-pass leave model.default.identify
second-pass enter model.default.exception_1
second-pass evaluate No
second-pass leave model.default.exception_1
second-pass enter model.default.A
second-pass enter model.default.A.default
second-pass enter model.default.A.default.A_initial
second-pass leave model.default.A.default.A_initial
second-pass enter model.default.A.default.A_1
static enter model
static enter model.region
static enter model.region.initial
static leave model.region.initial
static enter model.region.junction1
static leave model.region.junction1
static enter model.region.junction2
static leave model.region.junction2
static enter model.region.success
transitions enter compTest
transitions enter compTest.region
transitions enter compTest.region.initial
transitions leave compTest.region.initial
transitions enter compTest.region.activity1
transitions leave compTest.region.activity1
transitions enter compTest.region.activity2
transitions enter compTest.region.activity2.default
transitions enter compTest.region.activity2.default.subInitial
transitions leave compTest.region.activity2.default.subInitial
transitions enter compTest.region.activity2.default.subEnd
transitions leave compTest.region.activity2.default.subEnd
transitions leave compTest.region.activity2.default
transitions leave compTest.region.activity2
transitions enter compTest.region.junction1
transitions leave compTest.region.junction1
transitions enter compTest.region.junction2
transitions leave compTest.region.junction2
transitions enter compTest.region.activity3
transitions leave compTest.region.activity3
transitions enter compTest.region.end
instance enter model
instance enter model.default
instance enter model.default.initial
instance leave model.default.initial
instance enter model.default.stateA
instance evaluate {"fieldA":"test","fieldB":1}
instance evaluate {"fieldA":"test","fieldB":3}
instance leave model.default.stateA
instance enter model.default.stateB
test/brice.js
brice evaluate a
brice leave model.default.composite1.region1.state1
brice enter model.default.composite1.region1.state2
✓ Transitions should be selected depth-first
test/brice2.js
✓ Internal transitions are evaluated on completion events
✓ Internal transitions fire completion events if switch set
test/callbacks.js
User defined behavior
✓ State exit behavior called
✓ State entry behavior called
✓ State transition behavior called
test/choice.js
With an random distribution, we process all messages (and test the true random nature)
✓ choice pseudo state transitions all selected randomly
With an non-random distribution, each path is called equally
✓ choice pseudo state transition selection alignmed to random function used
test/directEntry
✓ Direct entry to a region that is part of an orthogonal state should trigger entry to sibling regions
test/callbacks.js
instance evaluate move
✓ Model will not respond to events
With the full model defined:
instance evaluate move
instance leave model.default.stateA
instance enter model.default.stateB
✓ Model will respond to events
test/else.js
✓ Test should result in a completed state
✓ Else from choice transition fired appropriately
✓ Else from junction transition fired appropriately
test/florent.js
florent evaluate ReleaseInput
florent leave model.default.on.onRegion.idle
florent enter model.default.on.onRegion.showMoveItemPattern
florent evaluate Disable
florent leave model.default.on.onRegion.showMoveItemPattern
florent leave model.default.on.onRegion
florent leave model.default.on
florent enter model.default.off
florent evaluate Enable
florent leave model.default.off
florent enter model.default.on
florent enter model.default.on.onRegion
florent enter model.default.on.onRegion.showMoveItemPattern
florent evaluate ReleaseInput
florent leave model.default.on.onRegion.showMoveItemPattern
florent enter model.default.on.onRegion.hideMoveItemPattern
florent leave model.default.on.onRegion.hideMoveItemPattern
florent enter model.default.on.onRegion.idle
florent evaluate Disable
florent leave model.default.on.onRegion.idle
florent leave model.default.on.onRegion
florent leave model.default.on
florent enter model.default.off
florent evaluate Enable
florent leave model.default.off
florent enter model.default.on
florent enter model.default.on.onRegion
florent enter model.default.on.onRegion.idle
✓ History semantics should set the regions active state configuration to the last known state
test/fungiboletus.js
fungiboletus enter model
fungiboletus enter model.default
fungiboletus enter model.default.initial
fungiboletus leave model.default.initial
fungiboletus enter model.default.defaultState
fungiboletus evaluate { type: 'abc' }
✓ Completion transition evaluation after internal transition should use the source vertex as the trigger event
test/history.js
✓ Test should result in a completed state
test/internal.js
internal evaluate internal
✓ Internal transitions do not trigger a state transition
internal evaluate to
internal leave model.region.state
internal enter model.region.state
✓ External transitions do trigger a state transition
test/joel.js
✓ When a regions leaves via a pseudo state, than pseudo state is left and not the last known state
Local transition tests
✓ External transition fired OK
test/muximise.js
State type tests
✓ simple state isSimple
✓ State.isComposite
✓ State.isOrthogonal
Orthogonal state completion
muximise evaluate complete1
muximise leave model.region.ortho.r1.s1
muximise enter model.region.ortho.r1.f1
muximise evaluate complete2
muximise leave model.region.ortho.r2.s2
muximise enter model.region.ortho.r2.f2
muximise leave model.region.ortho.r1.f1
muximise leave model.region.ortho.r1
muximise leave model.region.ortho.r2.f2
muximise leave model.region.ortho.r2
muximise leave model.region.ortho
muximise enter model.region.final
✓ Completion transition fires once all regions of an orthogonal state are complete
test/p3pp3r.js
p3pp3r evaluate event2
p3pp3r leave model.region.state1.regionA.state3
p3pp3r leave model.region.state1.regionA
p3pp3r leave model.region.state1.regionB.state4.regionBa.state6
p3pp3r leave model.region.state1.regionB.state4.regionBa
p3pp3r leave model.region.state1.regionB.state4.regionBb.state7
p3pp3r leave model.region.state1.regionB.state4.regionBb
p3pp3r leave model.region.state1.regionB.state4
p3pp3r leave model.region.state1.regionB
p3pp3r leave model.region.state1
p3pp3r enter model.region.state2
✓ All regions of orthogonal state must be exited during the to transition
test/params.js
✓ Multiple parameters available to exit behavior
✓ Multiple parameters available to entry behavior
✓ Multiple parameters available to transition behavior
test/redboltz1
✓ States can defer events for subsiquent evaluation
test/redboltz2
✓ Deferred events are evaluated after completion transitions
test/redboltz3
✓ Deferred events are evaluated after completion transitions
test/static.js
✓ Junction transitions implement a static conditional branch
✓ Junction transitions call all transition behavior after guards have been tested
test/transitions.js
✓ Completion transitions should be triggered by state entry
test/visitor.js
✓ A JSON serialized representation of a state machine instance can be produced by visiting a state machine
36 passing (19ms)