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