Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: runtime/observatory/tests/service/async_next_test.dart

Issue 1564493002: Make Scanner::kNoSourcePos be a true sentinel value (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/ast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'test_helper.dart'; 7 import 'test_helper.dart';
8 import 'dart:developer'; 8 import 'dart:developer';
9 9
10 foo() async { } 10 foo() async { }
11 11
12 doAsync(stop) async { 12 doAsync(stop) async {
13 if (stop) debugger(); 13 if (stop) debugger();
14 await foo(); // Line 14. 14 await foo(); // Line 14.
15 await foo(); // Line 15. 15 await foo(); // Line 15.
16 await foo(); // Line 16. 16 await foo(); // Line 16.
17 return null; 17 return null;
18 } 18 }
19 19
20 testMain() { 20 testMain() {
21 // With two runs of doAsync floating around, async step should only cause 21 // With two runs of doAsync floating around, async step should only cause
22 // us to stop in the run we started in. 22 // us to stop in the run we started in.
23 doAsync(false); 23 doAsync(false);
24 doAsync(true); 24 doAsync(true);
25 } 25 }
26 26
27 asyncNext(Isolate isolate) async { 27 asyncNext(Isolate isolate) async {
28 print('asyncNext');
28 return isolate.asyncStepOver()[Isolate.kSecondResume]; 29 return isolate.asyncStepOver()[Isolate.kSecondResume];
29 } 30 }
30 31
31 var tests = [ 32 var tests = [
32 hasStoppedAtBreakpoint, 33 hasStoppedAtBreakpoint,
33 stoppedAtLine(14), 34 stoppedAtLine(14),
34 asyncNext, 35 asyncNext,
35 hasStoppedAtBreakpoint, 36 hasStoppedAtBreakpoint,
36 stoppedAtLine(15), 37 stoppedAtLine(15),
37 asyncNext, 38 asyncNext,
38 hasStoppedAtBreakpoint, 39 hasStoppedAtBreakpoint,
39 stoppedAtLine(16), 40 stoppedAtLine(16),
40 resumeIsolate, 41 resumeIsolate,
41 ]; 42 ];
42 43
43 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 44 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698