| OLD | NEW |
| 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.dart_test; | 5 library test.src.task.dart_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/context/cache.dart'; | 7 import 'package:analyzer/src/context/cache.dart'; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/constant.dart'; | 9 import 'package:analyzer/src/generated/constant.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 void enableLints() { | 2247 void enableLints() { |
| 2248 AnalysisOptionsImpl options = context.analysisOptions; | 2248 AnalysisOptionsImpl options = context.analysisOptions; |
| 2249 options.lint = true; | 2249 options.lint = true; |
| 2250 context.analysisOptions = options; | 2250 context.analysisOptions = options; |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 @override | 2253 @override |
| 2254 void setUp() { | 2254 void setUp() { |
| 2255 super.setUp(); | 2255 super.setUp(); |
| 2256 enableLints(); | 2256 enableLints(); |
| 2257 lintRegistry[context] = [new GenerateLintsTaskTest_TestLinter()]; | 2257 setLints(context, [new GenerateLintsTaskTest_TestLinter()]); |
| 2258 } | 2258 } |
| 2259 | 2259 |
| 2260 @override | 2260 @override |
| 2261 void tearDown() { | 2261 void tearDown() { |
| 2262 lintRegistry[context] = []; | 2262 setLints(context, []); |
| 2263 super.tearDown(); | 2263 super.tearDown(); |
| 2264 } | 2264 } |
| 2265 | 2265 |
| 2266 test_camel_case_types() { | 2266 test_camel_case_types() { |
| 2267 Source source = newSource( | 2267 Source source = newSource( |
| 2268 '/test.dart', | 2268 '/test.dart', |
| 2269 ''' | 2269 ''' |
| 2270 class a { } | 2270 class a { } |
| 2271 '''); | 2271 '''); |
| 2272 | 2272 |
| (...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4308 /** | 4308 /** |
| 4309 * Fill [errorListener] with [result] errors in the current [task]. | 4309 * Fill [errorListener] with [result] errors in the current [task]. |
| 4310 */ | 4310 */ |
| 4311 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { | 4311 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { |
| 4312 List<AnalysisError> errors = task.outputs[result]; | 4312 List<AnalysisError> errors = task.outputs[result]; |
| 4313 expect(errors, isNotNull, reason: result.name); | 4313 expect(errors, isNotNull, reason: result.name); |
| 4314 errorListener = new GatheringErrorListener(); | 4314 errorListener = new GatheringErrorListener(); |
| 4315 errorListener.addAll(errors); | 4315 errorListener.addAll(errors); |
| 4316 } | 4316 } |
| 4317 } | 4317 } |
| OLD | NEW |