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

Unified Diff: pkg/analyzer_plugin/test/support/abstract_context.dart

Issue 2927663002: Port two completion contributors for use by plugins (Closed)
Patch Set: Created 3 years, 6 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: pkg/analyzer_plugin/test/support/abstract_context.dart
diff --git a/pkg/analyzer_plugin/test/support/abstract_context.dart b/pkg/analyzer_plugin/test/support/abstract_context.dart
index 8d6329ba04d6c8b2f21f177a941138ceff22b9b6..9ec849b040287c1955ad26fe10346b09a494ad18 100644
--- a/pkg/analyzer_plugin/test/support/abstract_context.dart
+++ b/pkg/analyzer_plugin/test/support/abstract_context.dart
@@ -56,6 +56,11 @@ class AbstractContextTest {
AnalysisDriver get driver => _driver;
+ /**
+ * Return `true` if strong mode should be enabled for this test.
+ */
+ bool get enableStrongMode => false;
+
Source addMetaPackageSource() => addPackageSource(
'meta',
'meta.dart',
@@ -114,6 +119,8 @@ class Required {
[new DartUriResolver(sdk), packageResolver, resourceResolver]);
PerformanceLog log = new PerformanceLog(_logBuffer);
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl()
+ ..strongMode = enableStrongMode;
_driver = new AnalysisDriver(
scheduler,
log,
@@ -122,7 +129,7 @@ class Required {
_fileContentOverlay,
null,
sourceFactory,
- new AnalysisOptionsImpl());
+ options);
scheduler.start();
AnalysisEngine.instance.logger = PrintLogger.instance;
}

Powered by Google App Engine
This is Rietveld 408576698