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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments Created 3 years, 9 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
(Empty)
1 // Copyright (c) 2017, 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 library field_script_test;
6
7 import 'package:observatory/service_io.dart';
8 import 'package:unittest/unittest.dart';
9 import 'test_helper.dart';
10 import 'service_test_common.dart';
11
12 part 'field_script_other.dart';
13
14 code() {
15 print(otherField);
16 }
17
18 var tests = [
19 hasPausedAtStart,
20 (Isolate isolate) async {
21 Library lib = await isolate.rootLibrary.load();
22 var fields = lib.variables;
23 expect(fields.length, 2);
24 print(lib.variables);
25 for(Field f in fields) {
26 await f.load();
27 String locationString = await f.location.toUserString();
28 if (f.name == "tests") {
29 expect(locationString, "field_script_test.dart:18:5");
30 } else if (f.name == "otherField") {
31 expect(locationString, "field_script_other.dart:7:5");
32 } else {
33 fail("Unexpected field: ${f.name}");
34 }
35 }
36 }
37 ];
38
39 main(args) {
40 runIsolateTestsSynchronous(args, tests,
41 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698