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

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

Issue 1517723002: Server custom error severity support (#24452). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: lib_renames Created 5 years 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 library test.analysis.notification.analysis_options; 5 library test.analysis.notification.analysis_options;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/constants.dart'; 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';
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 main() { 95 main() {
96 String unused = ""; 96 String unused = "";
97 } 97 }
98 '''); 98 ''');
99 99
100 setAnalysisRoot(); 100 setAnalysisRoot();
101 101
102 await waitForTasksFinished(); 102 await waitForTasksFinished();
103 103
104 // Verify options file. 104 // Verify options file.
105 expect(optionsFileErrors, hasLength(0)); 105 expect(optionsFileErrors, isEmpty);
106 106
107 // Verify test file. 107 // Verify test file.
108 expect(testFileErrors, hasLength(0)); 108 expect(testFileErrors, isEmpty);
109 } 109 }
110 110
111 test_error_filter_removed() async { 111 test_error_filter_removed() async {
112 addOptionsFile(''' 112 addOptionsFile('''
113 analyzer: 113 analyzer:
114 errors: 114 errors:
115 unused_local_variable: ignore 115 unused_local_variable: ignore
116 '''); 116 ''');
117 117
118 addTestFile(''' 118 addTestFile('''
119 main() { 119 main() {
120 String unused = ""; 120 String unused = "";
121 } 121 }
122 '''); 122 ''');
123 123
124 setAnalysisRoot(); 124 setAnalysisRoot();
125 125
126 await waitForTasksFinished(); 126 await waitForTasksFinished();
127 127
128 // Verify options file. 128 // Verify options file.
129 expect(optionsFileErrors, hasLength(0)); 129 expect(optionsFileErrors, isEmpty);
130 130
131 // Verify test file. 131 // Verify test file.
132 expect(testFileErrors, hasLength(0)); 132 expect(testFileErrors, isEmpty);
133 133
134 addOptionsFile(''' 134 addOptionsFile('''
135 analyzer: 135 analyzer:
136 errors: 136 errors:
137 # unused_local_variable: ignore 137 # unused_local_variable: ignore
138 '''); 138 ''');
139 139
140 await pumpEventQueue(); 140 await pumpEventQueue();
141 await waitForTasksFinished(); 141 await waitForTasksFinished();
142 142
143 // Verify options file. 143 // Verify options file.
144 expect(optionsFileErrors, hasLength(0)); 144 expect(optionsFileErrors, isEmpty);
145 145
146 // Verify test file. 146 // Verify test file.
147 expect(testFileErrors, hasLength(1)); 147 expect(testFileErrors, hasLength(1));
148 } 148 }
149 149
150 test_lint_options_changes() async { 150 test_lint_options_changes() async {
151 addOptionsFile(''' 151 addOptionsFile('''
152 linter: 152 linter:
153 rules: 153 rules:
154 - camel_case_types 154 - camel_case_types
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 AnalysisErrorType.STATIC_TYPE_WARNING, 303 AnalysisErrorType.STATIC_TYPE_WARNING,
304 AnalysisErrorType.COMPILE_TIME_ERROR 304 AnalysisErrorType.COMPILE_TIME_ERROR
305 ])); 305 ]));
306 } else { 306 } else {
307 // Should only produce a hint. 307 // Should only produce a hint.
308 expect(errors.map((error) => error.type), 308 expect(errors.map((error) => error.type),
309 unorderedEquals([AnalysisErrorType.HINT])); 309 unorderedEquals([AnalysisErrorType.HINT]));
310 } 310 }
311 } 311 }
312 } 312 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698