Index: runtime/observatory/tests/service/debugging_inlined_finally_test.dart |
diff --git a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart |
index 7f867a218f5b6bc04077af1c755b81f1520fda24..46d0089e214d314a05b8793f3aea0785c97d575f 100644 |
--- a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart |
+++ b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart |
@@ -21,13 +21,13 @@ testFunction() { |
try { |
for (int i = 0; i < 10; i++) { |
var x = () => i + a + b; |
- return x; // LINE_A |
+ return x; // LINE_A |
} |
} finally { |
- b = 10; // LINE_B |
+ b = 10; // LINE_B |
} |
} finally { |
- a = 1; // LINE_C |
+ a = 1; // LINE_C |
} |
} |
@@ -37,100 +37,98 @@ testMain() { |
} |
var tests = [ |
- |
-hasStoppedAtBreakpoint, |
+ hasStoppedAtBreakpoint, |
// Add breakpoint |
-(Isolate isolate) async { |
- await isolate.rootLibrary.load(); |
- |
- var script = isolate.rootLibrary.scripts[0]; |
- await script.load(); |
- |
- // Add 3 breakpoints. |
- { |
- var result = await isolate.addBreakpoint(script, LINE_A); |
- expect(result is Breakpoint, isTrue); |
- Breakpoint bpt = result; |
- expect(bpt.type, equals('Breakpoint')); |
- expect(bpt.location.script.id, equals(script.id)); |
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
- equals(LINE_A)); |
- expect(isolate.breakpoints.length, equals(1)); |
- } |
+ (Isolate isolate) async { |
+ await isolate.rootLibrary.load(); |
+ |
+ var script = isolate.rootLibrary.scripts[0]; |
+ await script.load(); |
+ |
+ // Add 3 breakpoints. |
+ { |
+ var result = await isolate.addBreakpoint(script, LINE_A); |
+ expect(result is Breakpoint, isTrue); |
+ Breakpoint bpt = result; |
+ expect(bpt.type, equals('Breakpoint')); |
+ expect(bpt.location.script.id, equals(script.id)); |
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
+ equals(LINE_A)); |
+ expect(isolate.breakpoints.length, equals(1)); |
+ } |
- { |
- var result = await isolate.addBreakpoint(script, LINE_B); |
- expect(result is Breakpoint, isTrue); |
- Breakpoint bpt = result; |
- expect(bpt.type, equals('Breakpoint')); |
- expect(bpt.location.script.id, equals(script.id)); |
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
- equals(LINE_B)); |
- expect(isolate.breakpoints.length, equals(2)); |
- } |
+ { |
+ var result = await isolate.addBreakpoint(script, LINE_B); |
+ expect(result is Breakpoint, isTrue); |
+ Breakpoint bpt = result; |
+ expect(bpt.type, equals('Breakpoint')); |
+ expect(bpt.location.script.id, equals(script.id)); |
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
+ equals(LINE_B)); |
+ expect(isolate.breakpoints.length, equals(2)); |
+ } |
- { |
- var result = await isolate.addBreakpoint(script, LINE_C); |
- expect(result is Breakpoint, isTrue); |
- Breakpoint bpt = result; |
- expect(bpt.type, equals('Breakpoint')); |
- expect(bpt.location.script.id, equals(script.id)); |
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
- equals(LINE_C)); |
- expect(isolate.breakpoints.length, equals(3)); |
- } |
+ { |
+ var result = await isolate.addBreakpoint(script, LINE_C); |
+ expect(result is Breakpoint, isTrue); |
+ Breakpoint bpt = result; |
+ expect(bpt.type, equals('Breakpoint')); |
+ expect(bpt.location.script.id, equals(script.id)); |
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos), |
+ equals(LINE_C)); |
+ expect(isolate.breakpoints.length, equals(3)); |
+ } |
- // Wait for breakpoint events. |
-}, |
+ // Wait for breakpoint events. |
+ }, |
-resumeIsolate, |
+ resumeIsolate, |
-hasStoppedAtBreakpoint, |
+ hasStoppedAtBreakpoint, |
// We are at the breakpoint on line LINE_A. |
-(Isolate isolate) async { |
- ServiceMap stack = await isolate.getStack(); |
- expect(stack.type, equals('Stack')); |
- expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
+ (Isolate isolate) async { |
+ ServiceMap stack = await isolate.getStack(); |
+ expect(stack.type, equals('Stack')); |
+ expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
- Script script = stack['frames'][0].location.script; |
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
- equals(LINE_A)); |
-}, |
+ Script script = stack['frames'][0].location.script; |
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
+ equals(LINE_A)); |
+ }, |
-resumeIsolate, |
+ resumeIsolate, |
-hasStoppedAtBreakpoint, |
+ hasStoppedAtBreakpoint, |
// We are at the breakpoint on line LINE_B. |
-(Isolate isolate) async { |
- ServiceMap stack = await isolate.getStack(); |
- expect(stack.type, equals('Stack')); |
- expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
+ (Isolate isolate) async { |
+ ServiceMap stack = await isolate.getStack(); |
+ expect(stack.type, equals('Stack')); |
+ expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
- Script script = stack['frames'][0].location.script; |
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
- equals(LINE_B)); |
-}, |
+ Script script = stack['frames'][0].location.script; |
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
+ equals(LINE_B)); |
+ }, |
-resumeIsolate, |
+ resumeIsolate, |
-hasStoppedAtBreakpoint, |
+ hasStoppedAtBreakpoint, |
// We are at the breakpoint on line LINE_C. |
-(Isolate isolate) async { |
- ServiceMap stack = await isolate.getStack(); |
- expect(stack.type, equals('Stack')); |
- expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
- |
- Script script = stack['frames'][0].location.script; |
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
- equals(LINE_C)); |
-}, |
+ (Isolate isolate) async { |
+ ServiceMap stack = await isolate.getStack(); |
+ expect(stack.type, equals('Stack')); |
+ expect(stack['frames'].length, greaterThanOrEqualTo(1)); |
-resumeIsolate, |
+ Script script = stack['frames'][0].location.script; |
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos), |
+ equals(LINE_C)); |
+ }, |
+ resumeIsolate, |
]; |
main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |