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

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: Typo. 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
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 test_analyzer_supported_exclude() { 125 test_analyzer_supported_exclude() {
126 validate( 126 validate(
127 ''' 127 '''
128 analyzer: 128 analyzer:
129 exclude: 129 exclude:
130 - test/_data/p4/lib/lib1.dart 130 - test/_data/p4/lib/lib1.dart
131 ''', 131 ''',
132 []); 132 []);
133 } 133 }
134 134
135 test_analyzer_supported_filter() {
136 validate(
137 '''
138 analyzer:
139 errors:
140 unused_local_variable: ignore
141 ''',
142 []);
143 }
144
135 test_analyzer_supported_strong_mode() { 145 test_analyzer_supported_strong_mode() {
136 validate( 146 validate(
137 ''' 147 '''
138 analyzer: 148 analyzer:
139 strong-mode: true 149 strong-mode: true
140 ''', 150 ''',
141 []); 151 []);
142 } 152 }
143 153
144 test_analyzer_unsupported_option() { 154 test_analyzer_unsupported_option() {
(...skipping 24 matching lines...) Expand all
169 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION]); 179 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION]);
170 } 180 }
171 181
172 void validate(String source, List<AnalysisOptionsErrorCode> expected) { 182 void validate(String source, List<AnalysisOptionsErrorCode> expected) {
173 var options = optionsProvider.getOptionsFromString(source); 183 var options = optionsProvider.getOptionsFromString(source);
174 var errors = validator.validate(options); 184 var errors = validator.validate(options);
175 expect(errors.map((AnalysisError e) => e.errorCode), 185 expect(errors.map((AnalysisError e) => e.errorCode),
176 unorderedEquals(expected)); 186 unorderedEquals(expected));
177 } 187 }
178 } 188 }
OLDNEW
« pkg/analyzer/lib/src/task/options.dart ('K') | « 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