@@ -28,7 +28,10 @@ void runTests({
28
28
late String isolateId;
29
29
late ScriptRef mainScript;
30
30
31
- Future <void > onBreakPoint (breakPointId, body) => testInspector.onBreakPoint (
31
+ Future <void > onBreakpoint (
32
+ String breakPointId,
33
+ Future <void > Function (Event ) body,
34
+ ) => testInspector.onBreakPoint (
32
35
stream,
33
36
isolateId,
34
37
mainScript,
@@ -39,8 +42,8 @@ void runTests({
39
42
Future <InstanceRef > getInstanceRef (frame, expression) =>
40
43
testInspector.getInstanceRef (isolateId, frame, expression);
41
44
42
- group ('$compilationMode |' , () {
43
- setUpAll (() async {
45
+ group ('$compilationMode | dot shorthands: ' , () {
46
+ setUp (() async {
44
47
setCurrentLogWriter (debug: debug);
45
48
await context.setUp (
46
49
testSettings: TestSettings (
@@ -58,23 +61,20 @@ void runTests({
58
61
isolateId = vm.isolates! .first.id! ;
59
62
final scripts = await service.getScripts (isolateId);
60
63
61
- await service.streamListen ('Debug' );
62
- stream = service.onEvent ( 'Debug' ) ;
64
+ await service.streamListen (EventStreams .kDebug );
65
+ stream = service.onDebugEvent ;
63
66
64
67
mainScript = scripts.scripts! .firstWhere (
65
68
(each) => each.uri! .contains ('main.dart' ),
66
69
);
67
70
});
68
71
69
- tearDownAll (() async {
72
+ tearDown (() async {
70
73
await context.tearDown ();
71
74
});
72
75
73
- setUp (() => setCurrentLogWriter (debug: debug));
74
- tearDown (() => service.resume (isolateId));
75
-
76
- test ('dot shorthands: expression evaluation' , () async {
77
- await onBreakPoint ('testDotShorthands' , (event) async {
76
+ test ('expression evaluation and single-stepping' , () async {
77
+ await onBreakpoint ('testDotShorthands' , (event) async {
78
78
final frame = event.topFrame! .index! ;
79
79
80
80
var instanceRef = await getInstanceRef (frame, '(c = .two).value' );
@@ -85,11 +85,7 @@ void runTests({
85
85
86
86
instanceRef = await getInstanceRef (frame, '(c = .four()).value' );
87
87
expect (instanceRef.valueAsString, '4' );
88
- });
89
- });
90
88
91
- test ('dot shorthands: single-stepping' , () async {
92
- await onBreakPoint ('testDotShorthands' , (event) async {
93
89
final scriptBasename = basename (mainScript.uri! );
94
90
95
91
const lineA = 116 ;
@@ -121,7 +117,6 @@ void runTests({
121
117
122
118
final stops = < String > [];
123
119
await testInspector.runStepIntoThroughProgramRecordingStops (
124
- stream,
125
120
isolateId,
126
121
stops,
127
122
provider.ddcModuleFormat == ModuleFormat .ddc ? 13 : 12 ,
0 commit comments