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

Side by Side Diff: tests/compiler/dart2js/platform_consistency_test.dart

Issue 1408253006: Introduce "platform configurations" to replace categories and libraries.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix create_sdk scripts according to review Created 5 years, 1 month 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
(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 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/platform_config_parser_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698