| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import "package:compiler/src/platform_configuration.dart"; | 5 import "package:compiler/src/platform_configuration.dart"; |
| 6 import "package:compiler/src/source_file_provider.dart"; | 6 import "package:compiler/src/source_file_provider.dart"; |
| 7 import "package:compiler/compiler_new.dart"; | 7 import "package:compiler/compiler_new.dart"; |
| 8 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
| 9 | 9 |
| 10 Uri unsupported = Uri.parse("unsupported:"); | 10 Uri unsupported = Uri.parse("unsupported:"); |
| 11 | 11 |
| 12 main() async { | 12 main() async { |
| 13 CompilerInput input = new CompilerSourceFileProvider(); | 13 CompilerInput input = new CompilerSourceFileProvider(); |
| 14 Map<String, Uri> client = await load( | 14 Map<String, Uri> client = |
| 15 Uri.base.resolve("sdk/lib/dart_client.platform"), | 15 await load(Uri.base.resolve("sdk/lib/dart_client.platform"), input); |
| 16 input); | 16 Map<String, Uri> server = |
| 17 Map<String, Uri> server = await load( | 17 await load(Uri.base.resolve("sdk/lib/dart_server.platform"), input); |
| 18 Uri.base.resolve("sdk/lib/dart_server.platform"), | 18 Map<String, Uri> shared = |
| 19 input); | 19 await load(Uri.base.resolve("sdk/lib/dart_shared.platform"), input); |
| 20 Map<String, Uri> shared = await load( | |
| 21 Uri.base.resolve("sdk/lib/dart_shared.platform"), | |
| 22 input); | |
| 23 Expect.setEquals(new Set.from(shared.keys), new Set.from(client.keys)); | 20 Expect.setEquals(new Set.from(shared.keys), new Set.from(client.keys)); |
| 24 Expect.setEquals(new Set.from(shared.keys), new Set.from(server.keys)); | 21 Expect.setEquals(new Set.from(shared.keys), new Set.from(server.keys)); |
| 25 | 22 |
| 26 for (String libraryName in shared.keys) { | 23 for (String libraryName in shared.keys) { |
| 27 test(Map<String, Uri> m) { | 24 test(Map<String, Uri> m) { |
| 28 if (m[libraryName] != unsupported && | 25 if (m[libraryName] != unsupported && shared[libraryName] != unsupported) { |
| 29 shared[libraryName] != unsupported) { | |
| 30 Expect.equals(shared[libraryName], m[libraryName]); | 26 Expect.equals(shared[libraryName], m[libraryName]); |
| 31 } | 27 } |
| 32 } | 28 } |
| 33 test(client); | 29 test(client); |
| 34 test(server); | 30 test(server); |
| 35 } | 31 } |
| 36 } | 32 } |
| OLD | NEW |