@@ -29,10 +29,7 @@ const testGroups = {
29
29
'send8b' ,
30
30
'send9'
31
31
] ,
32
- assign : [
33
- // 'assign_invalid', // TODO: handle error.execution event
34
- 'assign_obj_literal'
35
- ] ,
32
+ assign : [ 'assign_invalid' , 'assign_obj_literal' ] ,
36
33
'assign-current-small-step' : [ 'test0' , 'test1' , 'test2' , 'test3' , 'test4' ] ,
37
34
basic : [ 'basic0' , 'basic1' , 'basic2' ] ,
38
35
'cond-js' : [ 'test0' , 'test1' , 'test2' , 'TestConditionalTransition' ] ,
@@ -44,7 +41,7 @@ const testGroups = {
44
41
delayedSend : [ 'send1' , 'send2' , 'send3' ] ,
45
42
documentOrder : [ 'documentOrder0' ] ,
46
43
error : [
47
- // 'error', // not implemented
44
+ // 'error' // not implemented
48
45
] ,
49
46
forEach : [
50
47
// 'test1', // not implemented
@@ -61,12 +58,8 @@ const testGroups = {
61
58
'history5' ,
62
59
'history6'
63
60
] ,
64
- 'if-else' : [
65
- // 'test0', // microstep not implemented correctly
66
- ] ,
67
- in : [
68
- // 'TestInPredicate', // conversion of In() predicate not implemented yet
69
- ] ,
61
+ 'if-else' : [ 'test0' ] ,
62
+ in : [ 'TestInPredicate' ] ,
70
63
'internal-transitions' : [ 'test0' , 'test1' ] ,
71
64
misc : [ 'deep-initial' ] ,
72
65
'more-parallel' : [
@@ -86,9 +79,7 @@ const testGroups = {
86
79
'test10' ,
87
80
'test10b'
88
81
] ,
89
- 'multiple-events-per-transition' : [
90
- // 'test1'
91
- ] ,
82
+ 'multiple-events-per-transition' : [ 'test1' ] ,
92
83
parallel : [ 'test0' , 'test1' , 'test2' , 'test3' ] ,
93
84
'parallel+interrupt' : [
94
85
'test0' ,
@@ -134,7 +125,7 @@ const testGroups = {
134
125
// 'test0',
135
126
// 'test1'
136
127
] ,
137
- // 'send-data': ['send1'],
128
+ // 'send-data': ['send1'], // <content> conversion not implementd
138
129
// 'send-idlocation': ['test0'],
139
130
// 'send-internal': ['test0'],
140
131
'targetless-transition' : [ 'test0' , 'test1' , 'test2' , 'test3' ] ,
@@ -156,19 +147,19 @@ const testGroups = {
156
147
'test174.txml' ,
157
148
'test175.txml' ,
158
149
'test176.txml' ,
159
- // 'test179.txml', // conversion of <content> in <sens > not implemented yet
150
+ // 'test179.txml', // conversion of <content> in <send > not implemented yet
160
151
// 'test183.txml', idlocation not implemented yet
161
152
'test185.txml' ,
162
- // 'test186.txml', // not sure yet why
153
+ 'test186.txml' ,
163
154
'test187.txml' ,
164
155
'test189.txml' ,
165
- // 'test190.txml', // _sessionid not yet available for expressions
156
+ 'test190.txml' , // note: _sessionid is undefined for expressions
166
157
'test191.txml' ,
167
- // 'test192.txml', // conversion of #_invokeid not implemented yet
158
+ // 'test192.txml', // done.invoke inexact event descriptor
168
159
'test193.txml' ,
169
- // 'test194.txml', // illegal target for <send> causes the event error.execution to be raised
160
+ 'test194.txml' ,
170
161
// 'test198.txml', // origintype not implemented yet
171
- // 'test199.txml', // invalid send type results in error.execution
162
+ // 'test199.txml', // send type not checked
172
163
'test200.txml' ,
173
164
'test201.txml' ,
174
165
'test205.txml' ,
@@ -207,7 +198,7 @@ const testGroups = {
207
198
// 'test278.txml', // non-root datamodel with early binding not implemented yet
208
199
// 'test279.txml', // non-root datamodel with early binding not implemented yet
209
200
// 'test280.txml', // non-root datamodel with late binding not implemented yet
210
- // 'test286.txml', // error.execution when evaluating assign
201
+ 'test286.txml' ,
211
202
'test287.txml' ,
212
203
// 'test294.txml', // conversion of <donedata> not implemented yet
213
204
// 'test298.txml', // error.execution when evaluating donedata
@@ -254,16 +245,16 @@ const testGroups = {
254
245
// 'test354.txml', // conversion of namelist not implemented yet
255
246
'test355.txml' ,
256
247
'test364.txml' ,
257
- // 'test372.txml', // microstep not implemented correctly
248
+ // 'test372.txml', // microstep not implemented correctly for final states
258
249
'test375.txml' ,
259
250
// 'test376.txml', // executable blocks not implemented
260
251
'test377.txml' ,
261
252
// 'test378.txml', // executable blocks not implemented
262
253
'test387.txml' ,
263
- // 'test388.txml', // computed historyValue not being available immediately after exiting states for the following synchronous enterStates
254
+ 'test388.txml' ,
264
255
'test396.txml' ,
265
256
// 'test399.txml', // inexact prefix event matching not implemented
266
- // 'test401.txml', // error.execution when evaluating assign
257
+ // 'test401.txml', // inexact " error" event (should be "error.execution")
267
258
// 'test402.txml', // error.execution when evaluating assign + inexact prefix event matching not implemented
268
259
'test403a.txml' ,
269
260
'test403b.txml' ,
@@ -295,7 +286,7 @@ const testGroups = {
295
286
// 'test457.txml', // <foreach> not implemented yet
296
287
// 'test459.txml', // <foreach> not implemented yet
297
288
// 'test460.txml', // <foreach> not implemented yet
298
- // 'test487.txml', // error.execution when evaluating assign
289
+ 'test487.txml' ,
299
290
// 'test488.txml', // error.execution when evaluating param
300
291
'test495.txml' ,
301
292
// 'test496.txml', // error.communication not implemented yet
@@ -370,7 +361,13 @@ async function runW3TestToCompletion(machine: MachineNode): Promise<void> {
370
361
if ( nextState . value === 'pass' ) {
371
362
resolve ( ) ;
372
363
} else {
373
- reject ( new Error ( 'Reached "fail" state.' ) ) ;
364
+ reject (
365
+ new Error (
366
+ `Reached "fail" state with event ${ JSON . stringify (
367
+ nextState . event
368
+ ) } `
369
+ )
370
+ ) ;
374
371
}
375
372
} )
376
373
. start ( ) ;
@@ -397,7 +394,9 @@ async function runTestToCompletion(
397
394
} )
398
395
. onDone ( ( ) => {
399
396
if ( nextState . value === 'fail' ) {
400
- throw new Error ( 'Reached "fail" state.' ) ;
397
+ throw new Error (
398
+ `Reached "fail" state with event ${ JSON . stringify ( nextState . event ) } `
399
+ ) ;
401
400
}
402
401
done = true ;
403
402
} )
@@ -422,11 +421,11 @@ async function runTestToCompletion(
422
421
423
422
describe ( 'scxml' , ( ) => {
424
423
const testGroupKeys = Object . keys ( testGroups ) ;
425
- // const testGroupKeys = ['assign-current-small-step '];
424
+ // const testGroupKeys = ['w3c-ecma '];
426
425
427
426
testGroupKeys . forEach ( ( testGroupName ) => {
428
427
const testNames = testGroups [ testGroupName ] ;
429
- // const testNames = ['test2 '];
428
+ // const testNames = ['test372.txml '];
430
429
431
430
testNames . forEach ( ( testName ) => {
432
431
const scxmlSource =
0 commit comments