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

Side by Side Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 1562023002: Add test of unittests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 years, 11 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 leg_apiimpl; 5 library leg_apiimpl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:package_config/packages.dart'; 10 import 'package:package_config/packages.dart';
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 Future<elements.LibraryElement> analyzeUri( 428 Future<elements.LibraryElement> analyzeUri(
429 Uri uri, 429 Uri uri,
430 {bool skipLibraryWithPartOfTag: true}) { 430 {bool skipLibraryWithPartOfTag: true}) {
431 List<Future> setupFutures = new List<Future>(); 431 List<Future> setupFutures = new List<Future>();
432 if (sdkLibraries == null) { 432 if (sdkLibraries == null) {
433 setupFutures.add(setupSdk()); 433 setupFutures.add(setupSdk());
434 } 434 }
435 if (packages == null) { 435 if (packages == null) {
436 setupFutures.add(setupPackages(uri)); 436 setupFutures.add(setupPackages(uri));
437 } 437 }
438 return Future.wait(setupFutures).then((_) => super.analyzeUri(uri)); 438 return Future.wait(setupFutures).then((_) {
439 return super.analyzeUri(uri,
440 skipLibraryWithPartOfTag: skipLibraryWithPartOfTag);
441 });
439 } 442 }
440 443
441 Future setupPackages(Uri uri) { 444 Future setupPackages(Uri uri) {
442 if (packageRoot != null) { 445 if (packageRoot != null) {
443 // Use "non-file" packages because the file version requires a [Directory] 446 // Use "non-file" packages because the file version requires a [Directory]
444 // and we can't depend on 'dart:io' classes. 447 // and we can't depend on 'dart:io' classes.
445 packages = new NonFilePackagesDirectoryPackages(packageRoot); 448 packages = new NonFilePackagesDirectoryPackages(packageRoot);
446 } else if (packageConfig != null) { 449 } else if (packageConfig != null) {
447 return callUserProvider(packageConfig).then((packageConfigContents) { 450 return callUserProvider(packageConfig).then((packageConfigContents) {
448 if (packageConfigContents is String) { 451 if (packageConfigContents is String) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 Uri lookupLibraryUri(String libraryName) { 585 Uri lookupLibraryUri(String libraryName) {
583 assert(invariant(NO_LOCATION_SPANNABLE, 586 assert(invariant(NO_LOCATION_SPANNABLE,
584 sdkLibraries != null, message: "setupSdk() has not been run")); 587 sdkLibraries != null, message: "setupSdk() has not been run"));
585 return sdkLibraries[libraryName]; 588 return sdkLibraries[libraryName];
586 } 589 }
587 590
588 Uri resolvePatchUri(String libraryName) { 591 Uri resolvePatchUri(String libraryName) {
589 return backend.resolvePatchUri(libraryName, platformConfigUri); 592 return backend.resolvePatchUri(libraryName, platformConfigUri);
590 } 593 }
591 } 594 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | tests/compiler/dart2js/analyze_test_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698