Index: runtime/observatory/tests/service/debugger_location_second_test.dart |
diff --git a/runtime/observatory/tests/service/debugger_location_second_test.dart b/runtime/observatory/tests/service/debugger_location_second_test.dart |
index 48ac9169998df9cedb1a14697016b9eed179cb04..b2463ab0c05b9a739844bd366bc7649e013aca2c 100644 |
--- a/runtime/observatory/tests/service/debugger_location_second_test.dart |
+++ b/runtime/observatory/tests/service/debugger_location_second_test.dart |
@@ -19,7 +19,7 @@ void testFunction() { |
int i = 0; |
while (i == 0) { |
debugger(); |
- print('loop'); // Line A. |
+ print('loop'); // Line A. |
print('loop'); |
} |
} |
@@ -33,7 +33,8 @@ class TestDebugger extends Debugger { |
int currentFrame = 0; |
} |
-void debugger_location_dummy_function() {} |
+void debugger_location_dummy_function() { |
+} |
class DebuggerLocationTestFoo { |
DebuggerLocationTestFoo(this.field); |
@@ -45,7 +46,8 @@ class DebuggerLocationTestFoo { |
int field; |
} |
-class DebuggerLocationTestBar {} |
+class DebuggerLocationTestBar { |
+} |
Future<Debugger> initDebugger(Isolate isolate) { |
return isolate.getStack().then((stack) { |
@@ -54,156 +56,154 @@ Future<Debugger> initDebugger(Isolate isolate) { |
} |
var tests = [ |
- hasStoppedAtBreakpoint, |
+ |
+hasStoppedAtBreakpoint, |
// Load the isolate's libraries |
- (Isolate isolate) async { |
- for (var lib in isolate.libraries) { |
- await lib.load(); |
- } |
- }, |
+(Isolate isolate) async { |
+ for (var lib in isolate.libraries) { |
+ await lib.load(); |
+ } |
+}, |
// Parse method |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var loc = await DebuggerLocation.parse( |
- debugger, 'DebuggerLocationTestFoo.method'); |
- expect(loc.valid, isTrue); |
- expect(loc.toString(), equals('DebuggerLocationTestFoo.method')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var loc = |
+ await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.method'); |
+ expect(loc.valid, isTrue); |
+ expect(loc.toString(), equals('DebuggerLocationTestFoo.method')); |
+}, |
// Parse method |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var loc = await DebuggerLocation.parse( |
- debugger, 'DebuggerLocationTestFoo.field='); |
- expect(loc.valid, isTrue); |
- expect(loc.toString(), equals('DebuggerLocationTestFoo.field=')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var loc = |
+ await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.field='); |
+ expect(loc.valid, isTrue); |
+ expect(loc.toString(), equals('DebuggerLocationTestFoo.field=')); |
+}, |
// Parse bad method |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var loc = await DebuggerLocation.parse( |
- debugger, 'DebuggerLocationTestFoo.missing'); |
- expect(loc.valid, isFalse); |
- expect( |
- loc.toString(), |
- equals('invalid source location ' |
- '(Function \'DebuggerLocationTestFoo.missing\' not found)')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var loc = |
+ await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.missing'); |
+ expect(loc.valid, isFalse); |
+ expect(loc.toString(), equals( |
+ 'invalid source location ' |
+ '(Function \'DebuggerLocationTestFoo.missing\' not found)')); |
+}, |
// Complete function + script |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = await DebuggerLocation.complete(debugger, 'debugger_loc'); |
- expect( |
- completions.toString(), |
- equals('[debugger_location_dummy_function,' |
- ' debugger_location.dart:,' |
- ' debugger_location_second_test.dart:]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = await DebuggerLocation.complete(debugger, 'debugger_loc'); |
+ expect(completions.toString(), equals( |
+ '[debugger_location_dummy_function,' |
+ ' debugger_location.dart:,' |
+ ' debugger_location_second_test.dart:]')); |
+}, |
// Complete class |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = |
- await DebuggerLocation.complete(debugger, 'DebuggerLocationTe'); |
- expect( |
- completions.toString(), |
- equals('[DebuggerLocationTestBar,' |
- ' DebuggerLocationTestFoo]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, 'DebuggerLocationTe'); |
+ expect(completions.toString(), equals( |
+ '[DebuggerLocationTestBar,' |
+ ' DebuggerLocationTestFoo]')); |
+}, |
// No completions: unqualified name |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = |
- await DebuggerLocation.complete(debugger, 'debugger_locXYZZY'); |
- expect(completions.toString(), equals('[]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, 'debugger_locXYZZY'); |
+ expect(completions.toString(), equals('[]')); |
+}, |
// Complete method |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = |
- await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.m'); |
- expect( |
- completions.toString(), |
- equals('[DebuggerLocationTestFoo.madness,' |
- ' DebuggerLocationTestFoo.method]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.m'); |
+ expect(completions.toString(), equals( |
+ '[DebuggerLocationTestFoo.madness,' |
+ ' DebuggerLocationTestFoo.method]')); |
+}, |
// No completions: qualified name |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = |
- await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.q'); |
- expect(completions.toString(), equals('[]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.q'); |
+ expect(completions.toString(), equals('[]')); |
+}, |
// Complete script |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = await DebuggerLocation.complete( |
- debugger, 'debugger_location_second_te'); |
- expect(completions.toString(), |
- equals('[debugger_location_second_test.dart:]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, 'debugger_location_second_te'); |
+ expect(completions.toString(), equals( |
+ '[debugger_location_second_test.dart:]')); |
+}, |
// Complete script:line |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = await DebuggerLocation.complete( |
- debugger, 'debugger_location_second_test.dart:11'); |
- expect( |
- completions.toString(), |
- equals('[debugger_location_second_test.dart:${LINE_B + 0} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 0}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 1} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 1}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 2} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 2}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 3} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 3}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 4} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 4}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 5} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 5}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 6} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 6}:,' |
- ' debugger_location_second_test.dart:${LINE_B + 9} ,' |
- ' debugger_location_second_test.dart:${LINE_B + 9}:]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete(debugger, |
+ 'debugger_location_second_test.dart:11'); |
+ expect(completions.toString(), equals( |
+ '[debugger_location_second_test.dart:${LINE_B + 0} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 0}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 1} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 1}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 2} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 2}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 3} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 3}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 4} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 4}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 5} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 5}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 6} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 6}:,' |
+ ' debugger_location_second_test.dart:${LINE_B + 9} ,' |
+ ' debugger_location_second_test.dart:${LINE_B + 9}:]')); |
+}, |
// Complete script:line:col |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = await DebuggerLocation.complete( |
- debugger, 'debugger_location_second_test.dart:$LINE_C:2'); |
- expect( |
- completions.toString(), |
- equals('[debugger_location_second_test.dart:$LINE_C:2 ,' |
- ' debugger_location_second_test.dart:$LINE_C:20 ,' |
- ' debugger_location_second_test.dart:$LINE_C:21 ,' |
- ' debugger_location_second_test.dart:$LINE_C:22 ,' |
- ' debugger_location_second_test.dart:$LINE_C:23 ,' |
- ' debugger_location_second_test.dart:$LINE_C:24 ]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = |
+ await DebuggerLocation.complete( |
+ debugger, |
+ 'debugger_location_second_test.dart:$LINE_C:2'); |
+ expect(completions.toString(), equals( |
+ '[debugger_location_second_test.dart:$LINE_C:2 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:20 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:21 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:22 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:23 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:24 ]')); |
+}, |
// Complete without the script name. |
- (Isolate isolate) async { |
- var debugger = await initDebugger(isolate); |
- var completions = await DebuggerLocation.complete(debugger, '$LINE_C:2'); |
- expect( |
- completions.toString(), |
- equals('[debugger_location_second_test.dart:$LINE_C:2 ,' |
- ' debugger_location_second_test.dart:$LINE_C:20 ,' |
- ' debugger_location_second_test.dart:$LINE_C:21 ,' |
- ' debugger_location_second_test.dart:$LINE_C:22 ,' |
- ' debugger_location_second_test.dart:$LINE_C:23 ,' |
- ' debugger_location_second_test.dart:$LINE_C:24 ]')); |
- }, |
+(Isolate isolate) async { |
+ var debugger = await initDebugger(isolate); |
+ var completions = await DebuggerLocation.complete(debugger, '$LINE_C:2'); |
+ expect(completions.toString(), equals( |
+ '[debugger_location_second_test.dart:$LINE_C:2 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:20 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:21 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:22 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:23 ,' |
+ ' debugger_location_second_test.dart:$LINE_C:24 ]')); |
+}, |
+ |
]; |
main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); |