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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/platform_consistency_test.dart
diff --git a/tests/compiler/dart2js/platform_consistency_test.dart b/tests/compiler/dart2js/platform_consistency_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e946c167e297a0aed1cd5f39557698c0ac835bed
--- /dev/null
+++ b/tests/compiler/dart2js/platform_consistency_test.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+import "package:compiler/src/platform_configuration.dart";
+import "package:compiler/src/source_file_provider.dart";
+import "package:compiler/compiler_new.dart";
+import "package:expect/expect.dart";
+
+Uri unsupported = Uri.parse("unsupported:");
+
+main() async {
+ CompilerInput input = new CompilerSourceFileProvider();
+ Map<String, Uri> client = await load(
+ Uri.base.resolve("sdk/lib/dart_client.platform"),
+ input);
+ Map<String, Uri> server = await load(
+ Uri.base.resolve("sdk/lib/dart_server.platform"),
+ input);
+ Map<String, Uri> shared = await load(
+ Uri.base.resolve("sdk/lib/dart_shared.platform"),
+ input);
+ Map<String, Uri> dart2dart = await load(
+ Uri.base.resolve("sdk/lib/dart2dart.platform"),
+ input);
+ Expect.setEquals(new Set.from(shared.keys), new Set.from(client.keys));
+ Expect.setEquals(new Set.from(shared.keys), new Set.from(server.keys));
+ Expect.setEquals(new Set.from(shared.keys), new Set.from(dart2dart.keys));
+
+ for (String libraryName in shared.keys) {
+ test(Map<String, Uri> m) {
+ if (m[libraryName] != unsupported &&
+ shared[libraryName] != unsupported) {
+ Expect.equals(shared[libraryName], m[libraryName]);
+ }
+ }
+ test(client);
+ test(server);
+ test(dart2dart);
+ }
+ }
« 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