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

Unified Diff: pkg/front_end/test/summary_generator_test.dart

Issue 2964323002: Add support for multi-roots (Closed)
Patch Set: extra test Created 3 years, 5 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
« no previous file with comments | « pkg/front_end/test/src/multi_root_file_system_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/summary_generator_test.dart
diff --git a/pkg/front_end/test/summary_generator_test.dart b/pkg/front_end/test/summary_generator_test.dart
index 74b25601f721a609bcf71ab8a26852ddacf60730..5f6c6f2f6334d18007c0d4cf739844f5ea8cebc9 100644
--- a/pkg/front_end/test/summary_generator_test.dart
+++ b/pkg/front_end/test/summary_generator_test.dart
@@ -111,6 +111,27 @@ main() {
expect(errors, isEmpty);
});
+ test('summarization with multi-roots can work hermetically', () async {
+ var errors = [];
+ var options = new CompilerOptions()
+ ..onError = ((e) => errors.add(e))
+ ..multiRoots = [toTestUri('rootA/'), toTestUri('rootB/')];
+
+ var multiRootSources = <String, String>{
+ 'rootA/a.dart': allSources['a.dart'],
+ 'rootB/b.dart': allSources['b.dart'],
+ };
+
+ await summarize(['multi-root:/b.dart'], multiRootSources, options: options);
+ expect(errors.first.toString(), contains('Invalid access'));
+ errors.clear();
+
+ await summarize(
+ ['multi-root:/a.dart', 'multi-root:/b.dart'], multiRootSources,
+ options: options);
+ expect(errors, isEmpty);
+ });
+
// TODO(sigmund): test trimDependencies when it is part of the public API.
}
« no previous file with comments | « pkg/front_end/test/src/multi_root_file_system_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698