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

Side by Side Diff: pkg/code_transformers/test/resolver_test.dart

Issue 208623008: Include exports in resolver.libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/code_transformers/lib/src/resolver_impl.dart ('k') | no next file » | 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 library code_transformers.test.resolver_test; 5 library code_transformers.test.resolver_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io' show File, Platform; 8 import 'dart:io' show File, Platform;
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 }); 181 });
182 }); 182 });
183 183
184 test('should list all libraries', () { 184 test('should list all libraries', () {
185 return validateResolver( 185 return validateResolver(
186 inputs: { 186 inputs: {
187 'a|web/main.dart': ''' 187 'a|web/main.dart': '''
188 library a.main; 188 library a.main;
189 import 'package:a/a.dart'; 189 import 'package:a/a.dart';
190 import 'package:a/b.dart'; 190 import 'package:a/b.dart';
191 export 'package:a/d.dart';
191 ''', 192 ''',
192 'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";', 193 'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
193 'a|lib/b.dart': 'library a.b;\n import "c.dart";', 194 'a|lib/b.dart': 'library a.b;\n import "c.dart";',
194 'a|lib/c.dart': 'library a.c;' 195 'a|lib/c.dart': 'library a.c;',
196 'a|lib/d.dart': 'library a.d;'
195 }, 197 },
196 validator: (resolver) { 198 validator: (resolver) {
197 var libs = resolver.libraries.where((l) => !l.isInSdk); 199 var libs = resolver.libraries.where((l) => !l.isInSdk);
198 expect(libs.map((l) => l.name), unorderedEquals([ 200 expect(libs.map((l) => l.name), unorderedEquals([
199 'a.main', 201 'a.main',
200 'a.a', 202 'a.a',
201 'a.b', 203 'a.b',
202 'a.c', 204 'a.c',
205 'a.d',
203 ])); 206 ]));
204 }); 207 });
205 }); 208 });
206 209
207 test('should resolve types and library uris', () { 210 test('should resolve types and library uris', () {
208 return validateResolver( 211 return validateResolver(
209 inputs: { 212 inputs: {
210 'a|web/main.dart': ''' 213 'a|web/main.dart': '''
211 import 'dart:core'; 214 import 'dart:core';
212 import 'package:a/a.dart'; 215 import 'package:a/a.dart';
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 this.resolvers = resolvers; 345 this.resolvers = resolvers;
343 } 346 }
344 347
345 Future<bool> isPrimary(Asset input) => 348 Future<bool> isPrimary(Asset input) =>
346 new Future.value(input.id == primary); 349 new Future.value(input.id == primary);
347 350
348 applyResolver(Transform transform, Resolver resolver) { 351 applyResolver(Transform transform, Resolver resolver) {
349 return validator(resolver); 352 return validator(resolver);
350 } 353 }
351 } 354 }
OLDNEW
« no previous file with comments | « pkg/code_transformers/lib/src/resolver_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698