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

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

Issue 1267033002: Make Observatory analyzer clean (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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=--compile_all --error_on_bad_type --error_on_bad_override --verbos e_debug 4 // VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --verbos e_debug
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart';
8 import 'test_helper.dart'; 7 import 'test_helper.dart';
9 import 'dart:developer'; 8 import 'dart:developer';
10 9
11 foo() async { } 10 foo() async { }
12 11
13 doAsync(stop) async { 12 doAsync(stop) async {
14 if (stop) debugger(); 13 if (stop) debugger();
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 await foo(); // Line 17.
18 return null; 17 return null;
19 } 18 }
20 19
21 testMain() { 20 testMain() {
22 // 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
23 // us to stop in the run we started in. 22 // us to stop in the run we started in.
24 doAsync(false); 23 doAsync(false);
25 doAsync(true); 24 doAsync(true);
26 } 25 }
27 26
28 asyncNext(Isolate isolate) async { 27 asyncNext(Isolate isolate) async {
29 return isolate.asyncStepOver()[Isolate.kSecondResume]; 28 return isolate.asyncStepOver()[Isolate.kSecondResume];
30 } 29 }
31 30
32 var tests = [ 31 var tests = [
33 hasStoppedAtBreakpoint, 32 hasStoppedAtBreakpoint,
33 stoppedAtLine(14),
34 asyncNext,
35 hasStoppedAtBreakpoint,
34 stoppedAtLine(15), 36 stoppedAtLine(15),
35 asyncNext, 37 asyncNext,
36 hasStoppedAtBreakpoint, 38 hasStoppedAtBreakpoint,
37 stoppedAtLine(16), 39 stoppedAtLine(16),
38 asyncNext,
39 hasStoppedAtBreakpoint,
40 stoppedAtLine(17),
41 resumeIsolate, 40 resumeIsolate,
42 ]; 41 ];
43 42
44 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 43 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/cpu_profile.dart ('k') | runtime/observatory/tests/service/async_scope_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698