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

Side by Side Diff: tests/try/poi/poi_find_test.dart

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/try/poi/forget_element_test.dart ('k') | tests/try/poi/serialize_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
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 finds the right element. 5 /// Test that poi.dart finds the right element.
6 6
7 library trydart.poi_find_test; 7 library trydart.poi_find_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 'package:try/poi/poi.dart' as poi; 15 import 'package:try/poi/poi.dart' as poi;
16 16
17 import 'package:async_helper/async_helper.dart'; 17 import 'package:async_helper/async_helper.dart';
18 18
19 import 'package:expect/expect.dart'; 19 import 'package:expect/expect.dart';
20 20
21 import 'package:compiler/implementation/elements/elements.dart' show 21 import 'package:compiler/src/elements/elements.dart' show
22 Element; 22 Element;
23 23
24 import 'package:compiler/implementation/source_file_provider.dart' show 24 import 'package:compiler/src/source_file_provider.dart' show
25 FormattingDiagnosticHandler; 25 FormattingDiagnosticHandler;
26 26
27 Future testPoi() { 27 Future testPoi() {
28 Uri script = Platform.script.resolve('data/empty_main.dart'); 28 Uri script = Platform.script.resolve('data/empty_main.dart');
29 FormattingDiagnosticHandler handler = new FormattingDiagnosticHandler(); 29 FormattingDiagnosticHandler handler = new FormattingDiagnosticHandler();
30 handler.verbose = false; 30 handler.verbose = false;
31 31
32 Future future = poi.runPoi(script, 225, handler.provider, handler); 32 Future future = poi.runPoi(script, 225, handler.provider, handler);
33 return future.then((Element element) { 33 return future.then((Element element) {
34 Uri foundScript = element.compilationUnit.script.resourceUri; 34 Uri foundScript = element.compilationUnit.script.resourceUri;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 token = poi.findToken(element, position + 5); 67 token = poi.findToken(element, position + 5);
68 Expect.isNotNull(token, 'token'); 68 Expect.isNotNull(token, 'token');
69 Expect.equals(position + 4, token.charOffset, '$token'); 69 Expect.equals(position + 4, token.charOffset, '$token');
70 Expect.stringEquals('(', token.value); 70 Expect.stringEquals('(', token.value);
71 }); 71 });
72 } 72 }
73 73
74 void main() { 74 void main() {
75 asyncTest(testPoi); 75 asyncTest(testPoi);
76 } 76 }
OLDNEW
« no previous file with comments | « tests/try/poi/forget_element_test.dart ('k') | tests/try/poi/serialize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698