| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.non_error_resolver_test; | 5 library analyzer.test.generated.non_error_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 Source source = addSource(code); | 1072 Source source = addSource(code); |
| 1073 computeLibrarySourceErrors(source); | 1073 computeLibrarySourceErrors(source); |
| 1074 assertNoErrors(source); | 1074 assertNoErrors(source); |
| 1075 verify([source]); | 1075 verify([source]); |
| 1076 CompilationUnit unit = _getResolvedLibraryUnit(source); | 1076 CompilationUnit unit = _getResolvedLibraryUnit(source); |
| 1077 assertIsParameter(String search) { | 1077 assertIsParameter(String search) { |
| 1078 SimpleIdentifier ref = | 1078 SimpleIdentifier ref = |
| 1079 EngineTestCase.findSimpleIdentifier(unit, code, search); | 1079 EngineTestCase.findSimpleIdentifier(unit, code, search); |
| 1080 expect(ref.staticElement, new isInstanceOf<ParameterElement>()); | 1080 expect(ref.staticElement, new isInstanceOf<ParameterElement>()); |
| 1081 } | 1081 } |
| 1082 |
| 1082 assertIsParameter('p1'); | 1083 assertIsParameter('p1'); |
| 1083 assertIsParameter('p2'); | 1084 assertIsParameter('p2'); |
| 1084 assertIsParameter('p3'); | 1085 assertIsParameter('p3'); |
| 1085 assertIsParameter('p4'); | 1086 assertIsParameter('p4'); |
| 1086 assertIsParameter('p5'); | 1087 assertIsParameter('p5'); |
| 1087 assertIsParameter('p6'); | 1088 assertIsParameter('p6'); |
| 1088 } | 1089 } |
| 1089 | 1090 |
| 1090 void test_commentReference_class() { | 1091 void test_commentReference_class() { |
| 1091 String code = r''' | 1092 String code = r''' |
| (...skipping 5024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6116 reset(); | 6117 reset(); |
| 6117 } | 6118 } |
| 6118 | 6119 |
| 6119 void _check_wrongNumberOfParametersForOperator1(String name) { | 6120 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 6120 _check_wrongNumberOfParametersForOperator(name, "a"); | 6121 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 6121 } | 6122 } |
| 6122 | 6123 |
| 6123 CompilationUnit _getResolvedLibraryUnit(Source source) => | 6124 CompilationUnit _getResolvedLibraryUnit(Source source) => |
| 6124 analysisContext.getResolvedCompilationUnit2(source, source); | 6125 analysisContext.getResolvedCompilationUnit2(source, source); |
| 6125 } | 6126 } |
| OLD | NEW |