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

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

Issue 443213002: Send 'analysis.errors' notification only for files in analysis roots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 426e81c25a18b32815cd357fdf898248fd254b3d..d2c851985b8da64a755fad287a3b93d65183291e 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -41,7 +41,6 @@ main() {
handler = new AnalysisDomainHandler(server);
});
- group('notification.errors', testNotificationErrors);
group('updateContent', testUpdateContent);
group('setSubscriptions', test_setSubscriptions);
@@ -148,41 +147,6 @@ main() {
}
-testNotificationErrors() {
- AnalysisTestHelper helper;
-
- setUp(() {
- helper = new AnalysisTestHelper();
- });
-
- test('ParserError', () {
- helper.createSingleFileProject('library lib');
- return helper.waitForOperationsFinished().then((_) {
- List<AnalysisError> errors = helper.getTestErrors();
- expect(errors, hasLength(1));
- AnalysisError error = errors[0];
- expect(error.location.file, '/project/bin/test.dart');
- expect(error.location.offset, isPositive);
- expect(error.location.length, isNonNegative);
- expect(error.severity, 'ERROR');
- expect(error.type, 'SYNTACTIC_ERROR');
- expect(error.message, isNotNull);
- });
- });
-
- test('StaticWarning', () {
- helper.createSingleFileProject(['main() {', ' print(unknown);', '}']);
- return helper.waitForOperationsFinished().then((_) {
- List<AnalysisError> errors = helper.getTestErrors();
- expect(errors, hasLength(1));
- AnalysisError error = errors[0];
- expect(error.severity, 'WARNING');
- expect(error.type, 'STATIC_WARNING');
- });
- });
-}
-
-
testUpdateContent() {
test('full content', () {
AnalysisTestHelper helper = new AnalysisTestHelper();
@@ -310,11 +274,11 @@ void test_setSubscriptions() {
AnalysisTestHelper helper = new AnalysisTestHelper();
helper.createSingleFileProject('int V = 42;');
return helper.waitForOperationsFinished().then((_) {
- String noFile = '/no-such.file.dart';
- helper.addAnalysisSubscriptionErrors(noFile);
+ String noFile = '/no-such-file.dart';
+ helper.addAnalysisSubscriptionHighlights(noFile);
return helper.waitForOperationsFinished().then((_) {
- var errors = helper.getErrors(noFile);
- expect(errors, isEmpty);
+ var highlights = helper.getHighlights(noFile);
+ expect(highlights, isEmpty);
});
});
});
@@ -459,10 +423,6 @@ class AnalysisTestHelper {
handleSuccessfulRequest(request);
}
- void addAnalysisSubscriptionErrors(String file) {
- addAnalysisSubscription(AnalysisService.ERRORS, file);
- }
-
void addAnalysisSubscriptionHighlights(String file) {
addAnalysisSubscription(AnalysisService.HIGHLIGHTS, file);
}

Powered by Google App Engine
This is Rietveld 408576698