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

Unified Diff: pkg/analysis_server/test/context_manager_test.dart

Issue 1403983002: AS strong-mode .analysis_options awareness. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/analysis_server/test/context_manager_test.dart
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 18e482c24c174ba6c23a6deb699601d7be67de8b..0ae56591840e08f6b38d21c78b392849724b1c05 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -97,6 +97,25 @@ class AbstractContextManagerTest {
em.processPlugins([AnalysisEngine.instance.optionsPlugin]);
}
+ solo_test_strong_mode_analysis_option() async {
Jennifer Messerly 2015/10/13 20:01:02 remove "solo_"?
pquitslund 2015/10/13 20:10:58 Duh. Yeah. Thanks. Should have finished lunch! ;
+ // Create files.
+ newFile(
+ [projPath, '.analysis_options'],
+ r'''
+analyzer:
+ strong-mode: true
+''');
+ String libPath = newFolder([projPath, LIB_NAME]);
+ newFile([libPath, 'main.dart']);
+ // Setup context.
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+ // Verify that analysis options was parsed and strong-mode set.
+ Map<String, int> fileTimestamps =
+ callbacks.currentContextFilePaths[projPath];
+ expect(fileTimestamps, isNotEmpty);
+ expect(callbacks.currentContext.analysisOptions.strongMode, true);
+ }
+
void tearDown() {
ContextManagerImpl.ENABLE_PACKAGESPEC_SUPPORT = false;
}

Powered by Google App Engine
This is Rietveld 408576698