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

Side by Side Diff: pkg/analysis_server/test/services/linter/linter_test.dart

Issue 1855643002: More strong mode changes to analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout changes to options file Created 4 years, 8 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 library test.services.linter; 5 library test.services.linter;
6 6
7 import 'package:analysis_server/src/services/linter/linter.dart'; 7 import 'package:analysis_server/src/services/linter/linter.dart';
8 import 'package:analyzer/analyzer.dart'; 8 import 'package:analyzer/analyzer.dart';
9 import 'package:analyzer/source/analysis_options_provider.dart'; 9 import 'package:analyzer/source/analysis_options_provider.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 test_linter_undefined_rule() { 67 test_linter_undefined_rule() {
68 validate( 68 validate(
69 ''' 69 '''
70 linter: 70 linter:
71 rules: 71 rules:
72 - undefined 72 - undefined
73 ''', 73 ''',
74 [UNDEFINED_LINT_WARNING]); 74 [UNDEFINED_LINT_WARNING]);
75 } 75 }
76 76
77 validate(String source, List<AnalysisOptionsErrorCode> expected) { 77 validate(String source, List<ErrorCode> expected) {
78 var options = optionsProvider.getOptionsFromString(source); 78 var options = optionsProvider.getOptionsFromString(source);
79 validator.validate(reporter, options); 79 validator.validate(reporter, options);
80 expect(errors.map((AnalysisError e) => e.errorCode), 80 expect(errors.map((AnalysisError e) => e.errorCode),
81 unorderedEquals(expected)); 81 unorderedEquals(expected));
82 } 82 }
83 } 83 }
84 84
85 class _TestSource implements Source { 85 class _TestSource implements Source {
86 @override 86 @override
87 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 87 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
88 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698