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

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: check-fix 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
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dc415095c1f20526a227f61190a0c0242cb7dc11 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -369,9 +369,6 @@ analyzer:
expect(contexts[1].name, equals('/my/proj/lib'));
}
- // TODO(paulberry): This test only tests PackagesFileDisposition.
- // Once http://dartbug.com/23909 is fixed, add a test for sdk extensions
- // and PackageMapDisposition.
test_refresh_folder_with_packagespec() {
// create a context with a .packages file
String packagespecFile = posix.join(projPath, '.packages');
@@ -388,6 +385,9 @@ analyzer:
});
}
+ // TODO(paulberry): This test only tests PackagesFileDisposition.
+ // Once http://dartbug.com/23909 is fixed, add a test for sdk extensions
+ // and PackageMapDisposition.
test_refresh_folder_with_packagespec_subfolders() {
// Create a folder with no .packages file, containing two subfolders with
// .packages files.
@@ -1107,6 +1107,25 @@ test_pack:lib/
callbacks.assertContextFiles(project, [fileA]);
}
+ test_strong_mode_analysis_option() async {
+ // 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);
+ }
+
test_watch_addDummyLink() {
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
// empty folder initially
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698