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

Unified Diff: tests/compiler/dart2js/serialization/duplicate_library_test.dart

Issue 2004833003: Support multiple resolution inputs from command line. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 4 years, 7 months 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
Index: tests/compiler/dart2js/serialization/duplicate_library_test.dart
diff --git a/tests/compiler/dart2js/serialization/duplicate_library_test.dart b/tests/compiler/dart2js/serialization/duplicate_library_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3380c66be35b8d1193717ebbf5f55b2f3843e6d1
--- /dev/null
+++ b/tests/compiler/dart2js/serialization/duplicate_library_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2016, the Dart 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 file.
+
+library dart2js.serialization.duplicate_libraryc_test;
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/filenames.dart';
+import '../memory_compiler.dart';
+import 'helper.dart';
+import 'test_data.dart';
+
+void main(List<String> args) {
+ asyncTest(() async {
+ SerializedData data = await serializeDartCore(
+ arguments: new Arguments.from(args));
+ Map<String, String> sourceFiles = data.toMemorySourceFiles();
+ List<Uri> resolutionInputs = data.toUris();
+ Uri extraUri = Uri.parse('memory:extraUri');
+ sourceFiles[extraUri.path] = data.data;
+ resolutionInputs.add(extraUri);
+
+ DiagnosticCollector collector = new DiagnosticCollector();
+ await runCompiler(
+ entryPoint: Uris.dart_core,
+ memorySourceFiles: sourceFiles,
+ resolutionInputs: resolutionInputs,
+ diagnosticHandler: collector,
+ options: [Flags.analyzeAll]);
+ Expect.isTrue(collector.errors.isNotEmpty,
+ "Expected duplicate serialized library errors.");
+ });
+}
« no previous file with comments | « tests/compiler/dart2js/serialization/compilation_test.dart ('k') | tests/compiler/dart2js/serialization/equivalence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698