| 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 analyzer.test.src.task.dart_test; | 5 library analyzer.test.src.task.dart_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/ast/visitor.dart'; | 9 import 'package:analyzer/dart/ast/visitor.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3537 | 3537 |
| 3538 MethodDeclaration method = members[1]; | 3538 MethodDeclaration method = members[1]; |
| 3539 expectReference(method.body, false); | 3539 expectReference(method.body, false); |
| 3540 } | 3540 } |
| 3541 } | 3541 } |
| 3542 | 3542 |
| 3543 @reflectiveTest | 3543 @reflectiveTest |
| 3544 class ReferencedNamesBuilderTest extends _AbstractDartTaskTest { | 3544 class ReferencedNamesBuilderTest extends _AbstractDartTaskTest { |
| 3545 void setUp() { | 3545 void setUp() { |
| 3546 super.setUp(); | 3546 super.setUp(); |
| 3547 context.analysisOptions = new AnalysisOptionsImpl() | 3547 context.analysisOptions = new AnalysisOptionsImpl()..strongMode = true; |
| 3548 ..enableGenericMethods = true | |
| 3549 ..strongMode = true; | |
| 3550 } | 3548 } |
| 3551 | 3549 |
| 3552 test_class_constructor() { | 3550 test_class_constructor() { |
| 3553 ReferencedNames info = _computeReferencedNames(''' | 3551 ReferencedNames info = _computeReferencedNames(''' |
| 3554 class U { | 3552 class U { |
| 3555 U.named(A a, B b) { | 3553 U.named(A a, B b) { |
| 3556 C c = null; | 3554 C c = null; |
| 3557 } | 3555 } |
| 3558 } | 3556 } |
| 3559 '''); | 3557 '''); |
| (...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5658 /** | 5656 /** |
| 5659 * Fill [errorListener] with [result] errors in the current [task]. | 5657 * Fill [errorListener] with [result] errors in the current [task]. |
| 5660 */ | 5658 */ |
| 5661 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { | 5659 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { |
| 5662 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; | 5660 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; |
| 5663 expect(errors, isNotNull, reason: result.name); | 5661 expect(errors, isNotNull, reason: result.name); |
| 5664 errorListener = new GatheringErrorListener(); | 5662 errorListener = new GatheringErrorListener(); |
| 5665 errorListener.addAll(errors); | 5663 errorListener.addAll(errors); |
| 5666 } | 5664 } |
| 5667 } | 5665 } |
| OLD | NEW |