OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
5 | 5 |
6 import 'package:observatory/service_io.dart'; | 6 import 'package:observatory/service_io.dart'; |
7 import 'test_helper.dart'; | 7 import 'test_helper.dart'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:developer'; | 9 import 'dart:developer'; |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 }); | 41 }); |
42 }); | 42 }); |
43 isolate.stepOver(); | 43 isolate.stepOver(); |
44 return completer.future; | 44 return completer.future; |
45 } | 45 } |
46 | 46 |
47 smartNext(Isolate isolate) async { | 47 smartNext(Isolate isolate) async { |
48 if (isolate.pauseEvent.atAsyncJump) { | 48 if (isolate.pauseEvent.atAsyncJump) { |
49 print("next-async"); | 49 print("next-async"); |
50 List asyncStepFutures = await isolate.asyncStepOver(); | 50 List asyncStepFutures = await isolate.asyncStepOver(); |
51 return asyncStepFutures[Isolate.kSecondResume]; | 51 return asyncStepFutures[Isolate.kTestFuture]; |
52 } else { | 52 } else { |
53 print("next-sync"); | 53 print("next-sync"); |
54 return stepOverAwaitingResume(isolate); | 54 return stepOverAwaitingResume(isolate); |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 var tests = [ | 58 var tests = [ |
59 hasStoppedAtBreakpoint, stoppedAtLine(16), // foo() | 59 hasStoppedAtBreakpoint, stoppedAtLine(16), // foo() |
60 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await | 60 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await |
61 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar() | 61 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar() |
62 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar() | 62 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar() |
63 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo() | 63 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo() |
64 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await | 64 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await |
65 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo() | 65 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo() |
66 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await | 66 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await |
67 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar() | 67 smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar() |
68 resumeIsolate, | 68 resumeIsolate, |
69 ]; | 69 ]; |
70 | 70 |
71 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 71 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
OLD | NEW |