| Index: tests/compiler/dart2js/package_root_test.dart
|
| diff --git a/tests/compiler/dart2js/package_root_test.dart b/tests/compiler/dart2js/package_root_test.dart
|
| index 40cab4adeb537e502a844ab8ecdddb8f67cf82b2..20428ddeffd10ced0d85e2b33a6237cb4406ba07 100644
|
| --- a/tests/compiler/dart2js/package_root_test.dart
|
| +++ b/tests/compiler/dart2js/package_root_test.dart
|
| @@ -11,9 +11,8 @@ import 'dart:async';
|
| import 'package:async_helper/async_helper.dart';
|
| import 'package:expect/expect.dart';
|
| import 'package:compiler/compiler.dart'
|
| - show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider;
|
| -import 'package:compiler/src/diagnostics/messages.dart'
|
| - show MessageKind;
|
| + show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider;
|
| +import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
|
| import 'package:package_config/packages.dart';
|
|
|
| import 'memory_compiler.dart';
|
| @@ -32,11 +31,10 @@ main() {}
|
|
|
| final Uri PACKAGE_CONFIG_URI = Uri.parse('memory:package.config');
|
|
|
| -Future runTest(Uri main,
|
| - MessageKind expectedMessageKind,
|
| - {Uri packageRoot,
|
| - Uri packageConfig,
|
| - PackagesDiscoveryProvider packagesDiscoveryProvider}) async {
|
| +Future runTest(Uri main, MessageKind expectedMessageKind,
|
| + {Uri packageRoot,
|
| + Uri packageConfig,
|
| + PackagesDiscoveryProvider packagesDiscoveryProvider}) async {
|
| DiagnosticCollector collector = new DiagnosticCollector();
|
| await runCompiler(
|
| entryPoint: main,
|
| @@ -45,8 +43,8 @@ Future runTest(Uri main,
|
| packageRoot: packageRoot,
|
| packageConfig: packageConfig,
|
| packagesDiscoveryProvider: packagesDiscoveryProvider);
|
| - Expect.equals(1, collector.errors.length,
|
| - "Unexpected errors: ${collector.errors}");
|
| + Expect.equals(
|
| + 1, collector.errors.length, "Unexpected errors: ${collector.errors}");
|
| Expect.equals(expectedMessageKind, collector.errors.first.message.kind,
|
| "Unexpected error: ${collector.errors.first}");
|
| }
|
| @@ -60,30 +58,21 @@ void main() {
|
| return new Future.value(Packages.noPackages);
|
| };
|
|
|
| - await runTest(
|
| - Uri.parse('memory:main.dart'),
|
| - MessageKind.READ_SCRIPT_ERROR,
|
| + await runTest(Uri.parse('memory:main.dart'), MessageKind.READ_SCRIPT_ERROR,
|
| packageRoot: packageRoot);
|
| - await runTest(
|
| - Uri.parse('memory:main.dart'),
|
| - MessageKind.LIBRARY_NOT_FOUND,
|
| + await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND,
|
| packageConfig: PACKAGE_CONFIG_URI);
|
| - await runTest(
|
| - Uri.parse('memory:main.dart'),
|
| - MessageKind.LIBRARY_NOT_FOUND,
|
| + await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND,
|
| packagesDiscoveryProvider: noPackagesDiscovery);
|
|
|
| await runTest(
|
| - Uri.parse('package:foo/foo.dart'),
|
| - MessageKind.READ_SELF_ERROR,
|
| + Uri.parse('package:foo/foo.dart'), MessageKind.READ_SELF_ERROR,
|
| packageRoot: packageRoot);
|
| await runTest(
|
| - Uri.parse('package:foo/foo.dart'),
|
| - MessageKind.LIBRARY_NOT_FOUND,
|
| + Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND,
|
| packageConfig: PACKAGE_CONFIG_URI);
|
| await runTest(
|
| - Uri.parse('package:foo/foo.dart'),
|
| - MessageKind.LIBRARY_NOT_FOUND,
|
| + Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND,
|
| packagesDiscoveryProvider: noPackagesDiscovery);
|
| });
|
| }
|
|
|