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 --verbose_debug | 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug |
5 | 5 |
6 import 'package:observatory/service_io.dart'; | 6 import 'package:observatory/service_io.dart'; |
7 import 'service_test_common.dart'; | 7 import 'service_test_common.dart'; |
8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
9 import 'dart:developer'; | 9 import 'dart:developer'; |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 return null; | 22 return null; |
23 } | 23 } |
24 | 24 |
25 testMain() { | 25 testMain() { |
26 // With two runs of doAsync floating around, async step should only cause | 26 // With two runs of doAsync floating around, async step should only cause |
27 // us to stop in the run we started in. | 27 // us to stop in the run we started in. |
28 doAsync(false); | 28 doAsync(false); |
29 doAsync(true); | 29 doAsync(true); |
30 } | 30 } |
31 | 31 |
32 asyncNext(Isolate isolate) async { | |
33 print('asyncNext'); | |
34 return asyncStepOver(isolate); | |
35 } | |
36 | |
37 var tests = [ | 32 var tests = [ |
38 hasStoppedAtBreakpoint, | 33 hasStoppedAtBreakpoint, |
39 stoppedAtLine(LINE_A), | 34 stoppedAtLine(LINE_A), |
40 stepOver, // foo() | 35 stepOver, // foo() |
41 asyncNext, | 36 asyncNext, |
42 hasStoppedAtBreakpoint, | 37 hasStoppedAtBreakpoint, |
43 stoppedAtLine(LINE_B), | 38 stoppedAtLine(LINE_B), |
44 stepOver, // foo() | 39 stepOver, // foo() |
45 asyncNext, | 40 asyncNext, |
46 hasStoppedAtBreakpoint, | 41 hasStoppedAtBreakpoint, |
47 stoppedAtLine(LINE_C), | 42 stoppedAtLine(LINE_C), |
48 resumeIsolate, | 43 resumeIsolate, |
49 ]; | 44 ]; |
50 | 45 |
51 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 46 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
OLD | NEW |