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

Side by Side Diff: pkg/analyzer/test/src/task/options_test.dart

Issue 1420363005: Error Suppression FTW. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Test fix. Created 5 years, 1 month 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
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.src.task.options_test; 5 library test.src.task.options_test;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/source/analysis_options_provider.dart'; 8 import 'package:analyzer/source/analysis_options_provider.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 test_analyzer_supported_exclude() { 140 test_analyzer_supported_exclude() {
141 validate( 141 validate(
142 ''' 142 '''
143 analyzer: 143 analyzer:
144 exclude: 144 exclude:
145 - test/_data/p4/lib/lib1.dart 145 - test/_data/p4/lib/lib1.dart
146 ''', 146 ''',
147 []); 147 []);
148 } 148 }
149 149
150 test_analyzer_supported_filter() {
151 validate(
152 '''
153 analyzer:
154 errors:
155 unused_local_variable: ignore
156 ''',
157 []);
158 }
159
150 test_analyzer_supported_strong_mode() { 160 test_analyzer_supported_strong_mode() {
151 validate( 161 validate(
152 ''' 162 '''
153 analyzer: 163 analyzer:
154 strong-mode: true 164 strong-mode: true
155 ''', 165 ''',
156 []); 166 []);
157 } 167 }
158 168
159 test_analyzer_unsupported_option() { 169 test_analyzer_unsupported_option() {
(...skipping 24 matching lines...) Expand all
184 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION]); 194 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION]);
185 } 195 }
186 196
187 void validate(String source, List<AnalysisOptionsErrorCode> expected) { 197 void validate(String source, List<AnalysisOptionsErrorCode> expected) {
188 var options = optionsProvider.getOptionsFromString(source); 198 var options = optionsProvider.getOptionsFromString(source);
189 var errors = validator.validate(options); 199 var errors = validator.validate(options);
190 expect(errors.map((AnalysisError e) => e.errorCode), 200 expect(errors.map((AnalysisError e) => e.errorCode),
191 unorderedEquals(expected)); 201 unorderedEquals(expected));
192 } 202 }
193 } 203 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698