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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_analysis_options_test.dart

Issue 2960073002: Generate constants in server as we do in plugin (Closed)
Patch Set: improve names Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:analysis_server/protocol/protocol.dart'; 5 import 'package:analysis_server/protocol/protocol.dart';
6 import 'package:analysis_server/protocol/protocol_constants.dart';
6 import 'package:analysis_server/protocol/protocol_generated.dart' 7 import 'package:analysis_server/protocol/protocol_generated.dart'
7 hide AnalysisOptions; 8 hide AnalysisOptions;
8 import 'package:analysis_server/src/constants.dart';
9 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
11 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 11 import 'package:analyzer_plugin/protocol/protocol_common.dart';
12 import 'package:linter/src/rules.dart'; 12 import 'package:linter/src/rules.dart';
13 import 'package:test/test.dart'; 13 import 'package:test/test.dart';
14 import 'package:test_reflective_loader/test_reflective_loader.dart'; 14 import 'package:test_reflective_loader/test_reflective_loader.dart';
15 15
16 import '../analysis_abstract.dart'; 16 import '../analysis_abstract.dart';
17 import '../mocks.dart'; 17 import '../mocks.dart';
18 18
(...skipping 26 matching lines...) Expand all
45 void addOptionsFile(String contents) { 45 void addOptionsFile(String contents) {
46 addFile(optionsFilePath, contents); 46 addFile(optionsFilePath, contents);
47 } 47 }
48 48
49 void deleteFile(String filePath) { 49 void deleteFile(String filePath) {
50 resourceProvider.deleteFile(filePath); 50 resourceProvider.deleteFile(filePath);
51 } 51 }
52 52
53 @override 53 @override
54 void processNotification(Notification notification) { 54 void processNotification(Notification notification) {
55 if (notification.event == ANALYSIS_ERRORS) { 55 if (notification.event == ANALYSIS_NOTIFICATION_ERRORS) {
56 var decoded = new AnalysisErrorsParams.fromNotification(notification); 56 var decoded = new AnalysisErrorsParams.fromNotification(notification);
57 filesErrors[decoded.file] = decoded.errors; 57 filesErrors[decoded.file] = decoded.errors;
58 } 58 }
59 } 59 }
60 60
61 void setAnalysisRoot() { 61 void setAnalysisRoot() {
62 Request request = 62 Request request =
63 new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0'); 63 new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
64 handleSuccessfulRequest(request); 64 handleSuccessfulRequest(request);
65 } 65 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 @override 325 @override
326 String get optionsFilePath => '$projectPath/analysis_options.yaml'; 326 String get optionsFilePath => '$projectPath/analysis_options.yaml';
327 } 327 }
328 328
329 @reflectiveTest 329 @reflectiveTest
330 class OldAnalysisOptionsFileNotificationTest 330 class OldAnalysisOptionsFileNotificationTest
331 extends AnalysisOptionsFileNotificationTest { 331 extends AnalysisOptionsFileNotificationTest {
332 @override 332 @override
333 String get optionsFilePath => '$projectPath/.analysis_options'; 333 String get optionsFilePath => '$projectPath/.analysis_options';
334 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698