File tree Expand file tree Collapse file tree 4 files changed +5
-23
lines changed Expand file tree Collapse file tree 4 files changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ abstract class DebugListener {
5
5
6
6
void onScheduleNextAction ();
7
7
8
- void onNextAction ();
9
-
10
8
void onExecuteAction ();
11
9
12
10
void onStop ();
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import 'dart:collection';
3
3
import 'package:meta/meta.dart' ;
4
4
import 'package:simdart/src/event_phase.dart' ;
5
5
import 'package:simdart/src/internal/completer_action.dart' ;
6
- import 'package:simdart/src/internal/completer_interrupt.dart' ;
7
6
import 'package:simdart/src/internal/event_action.dart' ;
8
7
import 'package:simdart/src/simdart.dart' ;
9
8
Original file line number Diff line number Diff line change @@ -149,10 +149,9 @@ class SimDart implements SimDartInterface {
149
149
void stop () {
150
150
print ("stop" );
151
151
_addAction (StopAction (start: now, sim: this ));
152
- _scheduleNextAction ();
153
152
}
154
153
155
- void _disposeCompleteList () {
154
+ void _disposeCompleterList () {
156
155
while (_completerList.isNotEmpty) {
157
156
Completer <void > completer = _completerList.removeAt (0 );
158
157
_debugListener? .onRemoveCompleter ();
@@ -258,11 +257,9 @@ class SimDart implements SimDartInterface {
258
257
}
259
258
260
259
Future <void > _nextAction () async {
261
- print ('_nextAction' );
262
- _debugListener? .onNextAction ();
263
260
_nextActionScheduled = false ;
264
261
if (_actions.isEmpty || runState!= RunState .running) {
265
- _disposeCompleteList ();
262
+ _disposeCompleterList ();
266
263
if (! _terminator.isCompleted) {
267
264
_terminator.complete ();
268
265
}
Original file line number Diff line number Diff line change @@ -32,14 +32,11 @@ void main() {
32
32
helper.testEvents (['[0][a][called]' , '[0][a][finished]' ]);
33
33
helper.testTracks ([
34
34
'scheduleNextAction' ,
35
- 'nextAction' ,
36
35
'executeAction' ,
37
36
'scheduleNextAction' ,
38
- 'nextAction' ,
39
37
'executeAction' ,
40
38
'stop' ,
41
- 'scheduleNextAction' ,
42
- 'nextAction'
39
+ 'scheduleNextAction'
43
40
]);
44
41
expect (helper.completerCount, 0 );
45
42
});
@@ -70,17 +67,13 @@ void main() {
70
67
]);
71
68
helper.testTracks ([
72
69
'scheduleNextAction' ,
73
- 'nextAction' ,
74
70
'executeAction' ,
75
71
'scheduleNextAction' ,
76
- 'nextAction' ,
77
72
'executeAction' ,
78
73
'scheduleNextAction' ,
79
- 'nextAction' ,
80
74
'executeAction' ,
81
75
'stop' ,
82
- 'scheduleNextAction' ,
83
- 'nextAction'
76
+ 'scheduleNextAction'
84
77
]);
85
78
print ("counter valor:${sim .counter ('counter' ).value } " );
86
79
expect (sim.counter ('counter' ).value, 1 );
@@ -126,20 +119,15 @@ void main() {
126
119
]);
127
120
helper.testTracks ([
128
121
'scheduleNextAction' ,
129
- 'nextAction' ,
130
122
'executeAction' ,
131
123
'scheduleNextAction' ,
132
- 'nextAction' ,
133
124
'executeAction' ,
134
125
'scheduleNextAction' ,
135
- 'nextAction' ,
136
126
'executeAction' ,
137
127
'scheduleNextAction' ,
138
- 'nextAction' ,
139
128
'executeAction' ,
140
129
'stop' ,
141
- 'scheduleNextAction' ,
142
- 'nextAction'
130
+ 'scheduleNextAction'
143
131
]);
144
132
expect (sim.counter ('counter1' ).value, 1 );
145
133
expect (sim.counter ('counter2' ).value, 1 );
You can’t perform that action at this time.
0 commit comments