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

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

Issue 2291293003: Fix evaluating in async/sync*/async* methods. (Closed)
Patch Set: Created 4 years, 3 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/observatory/tests/service/evaluate_in_async_star_activation_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'dart:async';
6 import 'dart:developer';
7 import 'package:observatory/service_io.dart';
8 import 'package:unittest/unittest.dart';
9 import 'service_test_common.dart';
10 import 'test_helper.dart';
11
12 testFunction() async {
13 var x = 3;
14 var y = 4;
15 debugger();
16 var z = await new Future(() => x + y);
17 debugger();
18 return z;
19 }
20
21 var tests = [
22
23 hasStoppedAtBreakpoint,
24
25 (Isolate isolate) async {
26 // Make sure we are in the right place.
27 var stack = await isolate.getStack();
28 var topFrame = 0;
29 expect(stack.type, equals('Stack'));
30 expect(await stack['frames'][topFrame].location.getLine(), 16);
31
32 var result = await isolate.evalFrame(topFrame, "x");
33 print(result);
34 expect(result.valueAsString, equals("3"));
35 },
36
37 resumeIsolate,
38
39 hasStoppedAtBreakpoint,
40
41 (Isolate isolate) async {
42 // Make sure we are in the right place.
43 var stack = await isolate.getStack();
44 var topFrame = 0;
45 expect(stack.type, equals('Stack'));
46 expect(await stack['frames'][topFrame].location.getLine(), 18);
47
48 var result = await isolate.evalFrame(topFrame, "z");
49 print(result);
50 expect(result.valueAsString, equals("7"));
51 },
52
53 resumeIsolate,
54
55 ];
56
57 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/tests/service/evaluate_in_async_star_activation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698