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

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

Issue 2946313003: Restore partial analysis of analysis options files (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/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 0fbbc656fe083910de152d46303da32dbdb75cbe..ebb14878ede2fd1008e37be1472dafe4ca721f38 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -8,6 +8,7 @@ import 'dart:async';
import 'dart:collection';
import 'package:analysis_server/src/context_manager.dart';
+import 'package:analysis_server/src/plugin/notification_manager.dart';
import 'package:analysis_server/src/utilities/null_string_sink.dart';
import 'package:analyzer/context/context_root.dart';
import 'package:analyzer/error/error.dart';
@@ -39,6 +40,7 @@ import 'package:watcher/watcher.dart';
import 'mock_sdk.dart';
import 'mocks.dart';
+import 'src/plugin/plugin_manager_test.dart';
main() {
defineReflectiveSuite(() {
@@ -2034,7 +2036,7 @@ include: package:boo/other_options.yaml
String sdkExtSrcPath = newFolder([projPath, 'sdk_ext', 'src']);
newFile([sdkExtSrcPath, 'part.dart']);
// Setup analysis options file with ignore list.
- newFile(
+ String optionsFilePath = newFile(
[projPath, optionsFileName],
r'''
;
@@ -2042,7 +2044,11 @@ include: package:boo/other_options.yaml
// Setup context.
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
- // No error means success.
+ // Check that an error was produced.
+ TestNotificationManager notificationManager = callbacks.notificationManager;
+ var errors = notificationManager.recordedErrors;
+ expect(errors, hasLength(1));
+ expect(errors[errors.keys.first][optionsFilePath], hasLength(1));
}
test_deleteRoot_hasAnalysisOptions() async {
@@ -2587,6 +2593,9 @@ class TestContextManagerCallbacks extends ContextManagerCallbacks {
*/
List<WatchEvent> watchEvents = <WatchEvent>[];
+ @override
+ NotificationManager notificationManager = new TestNotificationManager();
+
TestContextManagerCallbacks(
this.resourceProvider, this.sdkManager, this.logger, this.scheduler);

Powered by Google App Engine
This is Rietveld 408576698