| 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.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 10 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| (...skipping 5536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5547 expect(type.typeArguments, hasLength(2)); | 5547 expect(type.typeArguments, hasLength(2)); |
| 5548 checkParamTypeRef(type.typeArguments[0], 1); | 5548 checkParamTypeRef(type.typeArguments[0], 1); |
| 5549 checkTypeRef(type.typeArguments[1], 'dart:core', 'dart:core', 'int'); | 5549 checkTypeRef(type.typeArguments[1], 'dart:core', 'dart:core', 'int'); |
| 5550 expect(type.reference, | 5550 expect(type.reference, |
| 5551 greaterThanOrEqualTo(unlinkedUnits[0].references.length)); | 5551 greaterThanOrEqualTo(unlinkedUnits[0].references.length)); |
| 5552 LinkedReference linkedReference = | 5552 LinkedReference linkedReference = |
| 5553 linked.units[0].references[type.reference]; | 5553 linked.units[0].references[type.reference]; |
| 5554 expect(linkedReference.dependency, 0); | 5554 expect(linkedReference.dependency, 0); |
| 5555 expect(linkedReference.kind, ReferenceKind.method); | 5555 expect(linkedReference.kind, ReferenceKind.method); |
| 5556 expect(linkedReference.name, 'f'); | 5556 expect(linkedReference.name, 'f'); |
| 5557 expect(linkedReference.numTypeParameters, 2); | 5557 expect(linkedReference.numTypeParameters, 0); |
| 5558 expect(linkedReference.unit, 0); | 5558 expect(linkedReference.unit, 0); |
| 5559 expect(linkedReference.containingReference, isNot(0)); | 5559 expect(linkedReference.containingReference, isNot(0)); |
| 5560 expect(linkedReference.containingReference, lessThan(type.reference)); | 5560 expect(linkedReference.containingReference, lessThan(type.reference)); |
| 5561 checkReferenceIndex(linkedReference.containingReference, null, null, 'D', | 5561 checkReferenceIndex(linkedReference.containingReference, null, null, 'D', |
| 5562 numTypeParameters: 2); | 5562 numTypeParameters: 2); |
| 5563 } | 5563 } |
| 5564 | 5564 |
| 5565 test_inferred_type_refers_to_function_typed_parameter_type_other_lib() { | 5565 test_inferred_type_refers_to_function_typed_parameter_type_other_lib() { |
| 5566 if (!strongMode || skipFullyLinkedData) { | 5566 if (!strongMode || skipFullyLinkedData) { |
| 5567 return; | 5567 return; |
| (...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7288 class _PrefixExpectation { | 7288 class _PrefixExpectation { |
| 7289 final ReferenceKind kind; | 7289 final ReferenceKind kind; |
| 7290 final String name; | 7290 final String name; |
| 7291 final String absoluteUri; | 7291 final String absoluteUri; |
| 7292 final String relativeUri; | 7292 final String relativeUri; |
| 7293 final int numTypeParameters; | 7293 final int numTypeParameters; |
| 7294 | 7294 |
| 7295 _PrefixExpectation(this.kind, this.name, | 7295 _PrefixExpectation(this.kind, this.name, |
| 7296 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 7296 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); |
| 7297 } | 7297 } |
| OLD | NEW |