OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 | 4 |
5 /// Test that poi.dart can serialize a scope. | 5 /// Test that poi.dart can serialize a scope. |
6 | 6 |
7 library trydart.serialize_test; | 7 library trydart.serialize_test; |
8 | 8 |
9 import 'dart:io' show | 9 import 'dart:io' show |
10 Platform; | 10 Platform; |
11 | 11 |
12 import 'dart:async' show | 12 import 'dart:async' show |
13 Future; | 13 Future; |
14 | 14 |
15 import 'dart:convert' show | 15 import 'dart:convert' show |
16 JSON; | 16 JSON; |
17 | 17 |
18 import 'package:try/poi/poi.dart' as poi; | 18 import 'package:try/poi/poi.dart' as poi; |
19 | 19 |
20 import 'package:async_helper/async_helper.dart'; | 20 import 'package:async_helper/async_helper.dart'; |
21 | 21 |
22 import 'package:expect/expect.dart'; | 22 import 'package:expect/expect.dart'; |
23 | 23 |
24 import 'package:compiler/src/elements/elements.dart' show | 24 import 'package:compiler/implementation/elements/elements.dart' show |
25 Element; | 25 Element; |
26 | 26 |
27 import 'package:compiler/src/source_file_provider.dart' show | 27 import 'package:compiler/implementation/source_file_provider.dart' show |
28 FormattingDiagnosticHandler; | 28 FormattingDiagnosticHandler; |
29 | 29 |
30 Future testInteresting() { | 30 Future testInteresting() { |
31 Uri script = Platform.script.resolve('data/interesting.dart'); | 31 Uri script = Platform.script.resolve('data/interesting.dart'); |
32 FormattingDiagnosticHandler handler = new FormattingDiagnosticHandler(); | 32 FormattingDiagnosticHandler handler = new FormattingDiagnosticHandler(); |
33 | 33 |
34 int position = 263; | 34 int position = 263; |
35 | 35 |
36 Future future = poi.runPoi(script, position, handler.provider, handler); | 36 Future future = poi.runPoi(script, position, handler.provider, handler); |
37 return future.then((Element element) { | 37 return future.then((Element element) { |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 "name": "noSuchMethod", | 596 "name": "noSuchMethod", |
597 "kind": "function", | 597 "kind": "function", |
598 "type": "(Invocation) -> dynamic" | 598 "type": "(Invocation) -> dynamic" |
599 }, | 599 }, |
600 { | 600 { |
601 "name": "runtimeType", | 601 "name": "runtimeType", |
602 "kind": "getter" | 602 "kind": "getter" |
603 } | 603 } |
604 ] | 604 ] |
605 }; | 605 }; |
OLD | NEW |