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

Side by Side Diff: pkg/analyzer_cli/test/driver_test.dart

Issue 1520663002: Driver test fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « no previous file | 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 analyzer_cli.test.driver; 5 library analyzer_cli.test.driver;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer/plugin/options.dart'; 9 import 'package:analyzer/plugin/options.dart';
10 import 'package:analyzer/source/analysis_options_provider.dart'; 10 import 'package:analyzer/source/analysis_options_provider.dart';
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 'test/data/options_tests_project/test_file.dart', 290 'test/data/options_tests_project/test_file.dart',
291 '--options', 291 '--options',
292 'test/data/options_tests_project/.analysis_options' 292 'test/data/options_tests_project/.analysis_options'
293 ]); 293 ]);
294 }); 294 });
295 tearDown(() { 295 tearDown(() {
296 outSink = savedOutSink; 296 outSink = savedOutSink;
297 }); 297 });
298 298
299 test('filters', () { 299 test('filters', () {
300 var filters = 300 var processors =
301 driver.context.getConfigurationData(CONFIGURED_ERROR_FILTERS); 301 driver.context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
302 expect(filters, hasLength(1)); 302 expect(processors, hasLength(1));
303 303
304 var unused_error = new AnalysisError( 304 var unused_local_variable = new AnalysisError(
305 new TestSource(), 0, 1, HintCode.UNUSED_LOCAL_VARIABLE, [ 305 new TestSource(), 0, 1, HintCode.UNUSED_LOCAL_VARIABLE, [
306 ['x'] 306 ['x']
307 ]); 307 ]);
308 expect(filters.any((filter) => filter(unused_error)), isTrue); 308
309 var unusedLocalVariable =
310 processors.firstWhere((p) => p.appliesTo(unused_local_variable));
311 expect(unusedLocalVariable.severity, isNull);
309 }); 312 });
310 313
311 test('language config', () { 314 test('language config', () {
312 expect(driver.context.analysisOptions.enableSuperMixins, isTrue); 315 expect(driver.context.analysisOptions.enableSuperMixins, isTrue);
313 }); 316 });
314 }); 317 });
315 }); 318 });
316 319
317 group('in temp directory', () { 320 group('in temp directory', () {
318 StringSink savedOutSink, savedErrorSink; 321 StringSink savedOutSink, savedErrorSink;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 this.options = options; 480 this.options = options;
478 } 481 }
479 } 482 }
480 483
481 class TestSource implements Source { 484 class TestSource implements Source {
482 TestSource(); 485 TestSource();
483 486
484 @override 487 @override
485 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 488 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
486 } 489 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698