@@ -28,7 +28,10 @@ void runTests({
2828 late String isolateId;
2929 late ScriptRef mainScript;
3030
31- Future <void > onBreakPoint (breakPointId, body) => testInspector.onBreakPoint (
31+ Future <void > onBreakpoint (
32+ String breakPointId,
33+ Future <void > Function (Event ) body,
34+ ) => testInspector.onBreakPoint (
3235 stream,
3336 isolateId,
3437 mainScript,
@@ -39,8 +42,8 @@ void runTests({
3942 Future <InstanceRef > getInstanceRef (frame, expression) =>
4043 testInspector.getInstanceRef (isolateId, frame, expression);
4144
42- group ('$compilationMode |' , () {
43- setUpAll (() async {
45+ group ('$compilationMode | dot shorthands: ' , () {
46+ setUp (() async {
4447 setCurrentLogWriter (debug: debug);
4548 await context.setUp (
4649 testSettings: TestSettings (
@@ -58,23 +61,20 @@ void runTests({
5861 isolateId = vm.isolates! .first.id! ;
5962 final scripts = await service.getScripts (isolateId);
6063
61- await service.streamListen ('Debug' );
62- stream = service.onEvent ( 'Debug' ) ;
64+ await service.streamListen (EventStreams .kDebug );
65+ stream = service.onDebugEvent ;
6366
6467 mainScript = scripts.scripts! .firstWhere (
6568 (each) => each.uri! .contains ('main.dart' ),
6669 );
6770 });
6871
69- tearDownAll (() async {
72+ tearDown (() async {
7073 await context.tearDown ();
7174 });
7275
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 {
7878 final frame = event.topFrame! .index! ;
7979
8080 var instanceRef = await getInstanceRef (frame, '(c = .two).value' );
@@ -85,11 +85,7 @@ void runTests({
8585
8686 instanceRef = await getInstanceRef (frame, '(c = .four()).value' );
8787 expect (instanceRef.valueAsString, '4' );
88- });
89- });
9088
91- test ('dot shorthands: single-stepping' , () async {
92- await onBreakPoint ('testDotShorthands' , (event) async {
9389 final scriptBasename = basename (mainScript.uri! );
9490
9591 const lineA = 116 ;
@@ -121,7 +117,6 @@ void runTests({
121117
122118 final stops = < String > [];
123119 await testInspector.runStepIntoThroughProgramRecordingStops (
124- stream,
125120 isolateId,
126121 stops,
127122 provider.ddcModuleFormat == ModuleFormat .ddc ? 13 : 12 ,
0 commit comments