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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 numTypeParameters: 2); | 1069 numTypeParameters: 2); |
1070 } | 1070 } |
1071 | 1071 |
1072 test_class_alias_supertype() { | 1072 test_class_alias_supertype() { |
1073 UnlinkedClass cls = | 1073 UnlinkedClass cls = |
1074 serializeClassText('class C = D with E; class D {} class E {}'); | 1074 serializeClassText('class C = D with E; class D {} class E {}'); |
1075 checkTypeRef(cls.supertype, null, null, 'D'); | 1075 checkTypeRef(cls.supertype, null, null, 'D'); |
1076 expect(cls.hasNoSupertype, isFalse); | 1076 expect(cls.hasNoSupertype, isFalse); |
1077 } | 1077 } |
1078 | 1078 |
| 1079 test_class_codeRange() { |
| 1080 UnlinkedClass cls = serializeClassText(' class C {}'); |
| 1081 _assertCodeRange(cls.codeRange, 1, 10); |
| 1082 } |
| 1083 |
1079 test_class_concrete() { | 1084 test_class_concrete() { |
1080 UnlinkedClass cls = serializeClassText('class C {}'); | 1085 UnlinkedClass cls = serializeClassText('class C {}'); |
1081 expect(cls.isAbstract, false); | 1086 expect(cls.isAbstract, false); |
1082 expect(unlinkedUnits[0].publicNamespace.names, hasLength(1)); | 1087 expect(unlinkedUnits[0].publicNamespace.names, hasLength(1)); |
1083 expect(unlinkedUnits[0].publicNamespace.names[0].kind, | 1088 expect(unlinkedUnits[0].publicNamespace.names[0].kind, |
1084 ReferenceKind.classOrEnum); | 1089 ReferenceKind.classOrEnum); |
1085 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'C'); | 1090 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'C'); |
1086 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); | 1091 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); |
1087 } | 1092 } |
1088 | 1093 |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4003 } | 4008 } |
4004 | 4009 |
4005 test_enum() { | 4010 test_enum() { |
4006 String text = 'enum E { v1 }'; | 4011 String text = 'enum E { v1 }'; |
4007 UnlinkedEnum e = serializeEnumText(text); | 4012 UnlinkedEnum e = serializeEnumText(text); |
4008 expect(e.name, 'E'); | 4013 expect(e.name, 'E'); |
4009 expect(e.nameOffset, text.indexOf('E')); | 4014 expect(e.nameOffset, text.indexOf('E')); |
4010 expect(e.values, hasLength(1)); | 4015 expect(e.values, hasLength(1)); |
4011 expect(e.values[0].name, 'v1'); | 4016 expect(e.values[0].name, 'v1'); |
4012 expect(e.values[0].nameOffset, text.indexOf('v1')); | 4017 expect(e.values[0].nameOffset, text.indexOf('v1')); |
| 4018 _assertCodeRange(e.codeRange, 0, 13); |
4013 expect(unlinkedUnits[0].publicNamespace.names, hasLength(1)); | 4019 expect(unlinkedUnits[0].publicNamespace.names, hasLength(1)); |
4014 expect(unlinkedUnits[0].publicNamespace.names[0].kind, | 4020 expect(unlinkedUnits[0].publicNamespace.names[0].kind, |
4015 ReferenceKind.classOrEnum); | 4021 ReferenceKind.classOrEnum); |
4016 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'E'); | 4022 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'E'); |
4017 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); | 4023 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); |
4018 } | 4024 } |
4019 | 4025 |
4020 test_enum_documented() { | 4026 test_enum_documented() { |
4021 String text = ''' | 4027 String text = ''' |
4022 // Extra comment so doc comment offset != 0 | 4028 // Extra comment so doc comment offset != 0 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4403 } | 4409 } |
4404 | 4410 |
4405 test_executable_member_function() { | 4411 test_executable_member_function() { |
4406 UnlinkedExecutable executable = findExecutable('f', | 4412 UnlinkedExecutable executable = findExecutable('f', |
4407 executables: serializeClassText('class C { f() {} }').executables); | 4413 executables: serializeClassText('class C { f() {} }').executables); |
4408 expect(executable.kind, UnlinkedExecutableKind.functionOrMethod); | 4414 expect(executable.kind, UnlinkedExecutableKind.functionOrMethod); |
4409 expect(executable.returnType, isNull); | 4415 expect(executable.returnType, isNull); |
4410 expect(executable.isExternal, isFalse); | 4416 expect(executable.isExternal, isFalse); |
4411 expect(executable.visibleOffset, 0); | 4417 expect(executable.visibleOffset, 0); |
4412 expect(executable.visibleLength, 0); | 4418 expect(executable.visibleLength, 0); |
| 4419 _assertCodeRange(executable.codeRange, 10, 6); |
4413 } | 4420 } |
4414 | 4421 |
4415 test_executable_member_function_explicit_return() { | 4422 test_executable_member_function_explicit_return() { |
4416 UnlinkedExecutable executable = findExecutable('f', | 4423 UnlinkedExecutable executable = findExecutable('f', |
4417 executables: | 4424 executables: |
4418 serializeClassText('class C { dynamic f() => null; }').executables); | 4425 serializeClassText('class C { dynamic f() => null; }').executables); |
4419 expect(executable.returnType, isNotNull); | 4426 expect(executable.returnType, isNotNull); |
4420 } | 4427 } |
4421 | 4428 |
4422 test_executable_member_function_external() { | 4429 test_executable_member_function_external() { |
4423 UnlinkedExecutable executable = findExecutable('f', | 4430 UnlinkedExecutable executable = findExecutable('f', |
4424 executables: | 4431 executables: |
4425 serializeClassText('class C { external f(); }').executables); | 4432 serializeClassText('class C { external f(); }').executables); |
4426 expect(executable.isExternal, isTrue); | 4433 expect(executable.isExternal, isTrue); |
4427 } | 4434 } |
4428 | 4435 |
4429 test_executable_member_getter() { | 4436 test_executable_member_getter() { |
4430 UnlinkedClass cls = serializeClassText('class C { int get f => 1; }'); | 4437 UnlinkedClass cls = serializeClassText('class C { int get f => 1; }'); |
4431 UnlinkedExecutable executable = | 4438 UnlinkedExecutable executable = |
4432 findExecutable('f', executables: cls.executables, failIfAbsent: true); | 4439 findExecutable('f', executables: cls.executables, failIfAbsent: true); |
4433 expect(executable.kind, UnlinkedExecutableKind.getter); | 4440 expect(executable.kind, UnlinkedExecutableKind.getter); |
4434 expect(executable.returnType, isNotNull); | 4441 expect(executable.returnType, isNotNull); |
4435 expect(executable.isExternal, isFalse); | 4442 expect(executable.isExternal, isFalse); |
| 4443 _assertCodeRange(executable.codeRange, 10, 15); |
4436 expect(findVariable('f', variables: cls.fields), isNull); | 4444 expect(findVariable('f', variables: cls.fields), isNull); |
4437 expect(findExecutable('f=', executables: cls.executables), isNull); | 4445 expect(findExecutable('f=', executables: cls.executables), isNull); |
4438 } | 4446 } |
4439 | 4447 |
4440 test_executable_member_getter_external() { | 4448 test_executable_member_getter_external() { |
4441 UnlinkedClass cls = serializeClassText('class C { external int get f; }'); | 4449 UnlinkedClass cls = serializeClassText('class C { external int get f; }'); |
4442 UnlinkedExecutable executable = | 4450 UnlinkedExecutable executable = |
4443 findExecutable('f', executables: cls.executables, failIfAbsent: true); | 4451 findExecutable('f', executables: cls.executables, failIfAbsent: true); |
4444 expect(executable.isExternal, isTrue); | 4452 expect(executable.isExternal, isTrue); |
4445 } | 4453 } |
4446 | 4454 |
4447 test_executable_member_setter() { | 4455 test_executable_member_setter() { |
4448 UnlinkedClass cls = serializeClassText('class C { void set f(value) {} }'); | 4456 UnlinkedClass cls = serializeClassText('class C { void set f(value) {} }'); |
4449 UnlinkedExecutable executable = | 4457 UnlinkedExecutable executable = |
4450 findExecutable('f=', executables: cls.executables, failIfAbsent: true); | 4458 findExecutable('f=', executables: cls.executables, failIfAbsent: true); |
4451 expect(executable.kind, UnlinkedExecutableKind.setter); | 4459 expect(executable.kind, UnlinkedExecutableKind.setter); |
4452 expect(executable.returnType, isNotNull); | 4460 expect(executable.returnType, isNotNull); |
4453 expect(executable.isExternal, isFalse); | 4461 expect(executable.isExternal, isFalse); |
| 4462 _assertCodeRange(executable.codeRange, 10, 20); |
4454 expect(findVariable('f', variables: cls.fields), isNull); | 4463 expect(findVariable('f', variables: cls.fields), isNull); |
4455 expect(findExecutable('f', executables: cls.executables), isNull); | 4464 expect(findExecutable('f', executables: cls.executables), isNull); |
4456 } | 4465 } |
4457 | 4466 |
4458 test_executable_member_setter_external() { | 4467 test_executable_member_setter_external() { |
4459 UnlinkedClass cls = | 4468 UnlinkedClass cls = |
4460 serializeClassText('class C { external void set f(value); }'); | 4469 serializeClassText('class C { external void set f(value); }'); |
4461 UnlinkedExecutable executable = | 4470 UnlinkedExecutable executable = |
4462 findExecutable('f=', executables: cls.executables, failIfAbsent: true); | 4471 findExecutable('f=', executables: cls.executables, failIfAbsent: true); |
4463 expect(executable.isExternal, isTrue); | 4472 expect(executable.isExternal, isTrue); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4565 expect(executable.typeParameters, isEmpty); | 4574 expect(executable.typeParameters, isEmpty); |
4566 } | 4575 } |
4567 | 4576 |
4568 test_executable_operator_less_equal() { | 4577 test_executable_operator_less_equal() { |
4569 UnlinkedExecutable executable = | 4578 UnlinkedExecutable executable = |
4570 serializeClassText('class C { bool operator<=(C other) => false; }') | 4579 serializeClassText('class C { bool operator<=(C other) => false; }') |
4571 .executables[0]; | 4580 .executables[0]; |
4572 expect(executable.name, '<='); | 4581 expect(executable.name, '<='); |
4573 } | 4582 } |
4574 | 4583 |
| 4584 test_executable_param_codeRange() { |
| 4585 UnlinkedExecutable executable = serializeExecutableText('f(int x) {}'); |
| 4586 UnlinkedParam parameter = executable.parameters[0]; |
| 4587 _assertCodeRange(parameter.codeRange, 2, 5); |
| 4588 } |
| 4589 |
4575 test_executable_param_function_typed() { | 4590 test_executable_param_function_typed() { |
4576 if (!checkAstDerivedData) { | 4591 if (!checkAstDerivedData) { |
4577 // TODO(paulberry): this test fails when building the summary from the | 4592 // TODO(paulberry): this test fails when building the summary from the |
4578 // element model because the elment model doesn't record whether a | 4593 // element model because the elment model doesn't record whether a |
4579 // function-typed parameter's return type is implicit. | 4594 // function-typed parameter's return type is implicit. |
4580 return; | 4595 return; |
4581 } | 4596 } |
4582 UnlinkedExecutable executable = serializeExecutableText('f(g()) {}'); | 4597 UnlinkedExecutable executable = serializeExecutableText('f(g()) {}'); |
4583 expect(executable.parameters[0].isFunctionTyped, isTrue); | 4598 expect(executable.parameters[0].isFunctionTyped, isTrue); |
4584 expect(executable.parameters[0].type, isNull); | 4599 expect(executable.parameters[0].type, isNull); |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6787 allowTypeParameters: true, numTypeParameters: 2); | 6802 allowTypeParameters: true, numTypeParameters: 2); |
6788 expect(typeRef.typeArguments, hasLength(2)); | 6803 expect(typeRef.typeArguments, hasLength(2)); |
6789 checkTypeRef(typeRef.typeArguments[0], 'dart:core', 'dart:core', 'int'); | 6804 checkTypeRef(typeRef.typeArguments[0], 'dart:core', 'dart:core', 'int'); |
6790 checkTypeRef(typeRef.typeArguments[1], 'dart:core', 'dart:core', 'Object'); | 6805 checkTypeRef(typeRef.typeArguments[1], 'dart:core', 'dart:core', 'Object'); |
6791 } | 6806 } |
6792 | 6807 |
6793 test_type_dynamic() { | 6808 test_type_dynamic() { |
6794 checkDynamicTypeRef(serializeTypeText('dynamic')); | 6809 checkDynamicTypeRef(serializeTypeText('dynamic')); |
6795 } | 6810 } |
6796 | 6811 |
| 6812 test_type_param_codeRange() { |
| 6813 UnlinkedClass cls = |
| 6814 serializeClassText('class A {} class C<T extends A> {}'); |
| 6815 UnlinkedTypeParam typeParameter = cls.typeParameters[0]; |
| 6816 _assertCodeRange(typeParameter.codeRange, 19, 11); |
| 6817 } |
| 6818 |
6797 test_type_param_not_shadowed_by_constructor() { | 6819 test_type_param_not_shadowed_by_constructor() { |
6798 UnlinkedClass cls = | 6820 UnlinkedClass cls = |
6799 serializeClassText('class C<D> { D x; C.D(); } class D {}'); | 6821 serializeClassText('class C<D> { D x; C.D(); } class D {}'); |
6800 checkParamTypeRef(cls.fields[0].type, 1); | 6822 checkParamTypeRef(cls.fields[0].type, 1); |
6801 } | 6823 } |
6802 | 6824 |
6803 test_type_param_not_shadowed_by_field_in_extends() { | 6825 test_type_param_not_shadowed_by_field_in_extends() { |
6804 UnlinkedClass cls = | 6826 UnlinkedClass cls = |
6805 serializeClassText('class C<T> extends D<T> { T x; } class D<T> {}'); | 6827 serializeClassText('class C<T> extends D<T> { T x; } class D<T> {}'); |
6806 checkParamTypeRef(cls.supertype.typeArguments[0], 1); | 6828 checkParamTypeRef(cls.supertype.typeArguments[0], 1); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7045 // from them. | 7067 // from them. |
7046 checkTypeRef(typeRef, absUri('/a.dart'), 'a.dart', 'C', | 7068 checkTypeRef(typeRef, absUri('/a.dart'), 'a.dart', 'C', |
7047 expectedTargetUnit: 2); | 7069 expectedTargetUnit: 2); |
7048 } | 7070 } |
7049 | 7071 |
7050 test_type_unresolved() { | 7072 test_type_unresolved() { |
7051 EntityRef typeRef = serializeTypeText('Foo', allowErrors: true); | 7073 EntityRef typeRef = serializeTypeText('Foo', allowErrors: true); |
7052 checkUnresolvedTypeRef(typeRef, null, 'Foo'); | 7074 checkUnresolvedTypeRef(typeRef, null, 'Foo'); |
7053 } | 7075 } |
7054 | 7076 |
| 7077 test_typedef_codeRange() { |
| 7078 UnlinkedTypedef type = serializeTypedefText('typedef F();'); |
| 7079 _assertCodeRange(type.codeRange, 0, 12); |
| 7080 } |
| 7081 |
7055 test_typedef_documented() { | 7082 test_typedef_documented() { |
7056 String text = ''' | 7083 String text = ''' |
7057 // Extra comment so doc comment offset != 0 | 7084 // Extra comment so doc comment offset != 0 |
7058 /** | 7085 /** |
7059 * Docs | 7086 * Docs |
7060 */ | 7087 */ |
7061 typedef F();'''; | 7088 typedef F();'''; |
7062 UnlinkedTypedef typedef = serializeTypedefText(text); | 7089 UnlinkedTypedef typedef = serializeTypedefText(text); |
7063 expect(typedef.documentationComment, isNotNull); | 7090 expect(typedef.documentationComment, isNotNull); |
7064 checkDocumentationComment(typedef.documentationComment, text); | 7091 checkDocumentationComment(typedef.documentationComment, text); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7129 expect(type.typeParameters, isEmpty); | 7156 expect(type.typeParameters, isEmpty); |
7130 } | 7157 } |
7131 | 7158 |
7132 test_typedef_type_param_order() { | 7159 test_typedef_type_param_order() { |
7133 UnlinkedTypedef type = serializeTypedefText('typedef F<T, U>();'); | 7160 UnlinkedTypedef type = serializeTypedefText('typedef F<T, U>();'); |
7134 expect(type.typeParameters, hasLength(2)); | 7161 expect(type.typeParameters, hasLength(2)); |
7135 expect(type.typeParameters[0].name, 'T'); | 7162 expect(type.typeParameters[0].name, 'T'); |
7136 expect(type.typeParameters[1].name, 'U'); | 7163 expect(type.typeParameters[1].name, 'U'); |
7137 } | 7164 } |
7138 | 7165 |
| 7166 test_unit_codeRange() { |
| 7167 serializeLibraryText(' int a = 1; '); |
| 7168 UnlinkedUnit unit = unlinkedUnits[0]; |
| 7169 _assertCodeRange(unit.codeRange, 0, 14); |
| 7170 } |
| 7171 |
7139 test_unresolved_reference_in_multiple_parts() { | 7172 test_unresolved_reference_in_multiple_parts() { |
7140 addNamedSource('/a.dart', 'part of foo; int x; Unresolved y;'); | 7173 addNamedSource('/a.dart', 'part of foo; int x; Unresolved y;'); |
7141 serializeLibraryText('library foo; part "a.dart"; Unresolved z;', | 7174 serializeLibraryText('library foo; part "a.dart"; Unresolved z;', |
7142 allowErrors: true); | 7175 allowErrors: true); |
7143 // The unresolved types in the defining compilation unit and the part | 7176 // The unresolved types in the defining compilation unit and the part |
7144 // should both work correctly even though they use different reference | 7177 // should both work correctly even though they use different reference |
7145 // indices. | 7178 // indices. |
7146 checkUnresolvedTypeRef( | 7179 checkUnresolvedTypeRef( |
7147 unlinkedUnits[0].variables[0].type, null, 'Unresolved'); | 7180 unlinkedUnits[0].variables[0].type, null, 'Unresolved'); |
7148 checkUnresolvedTypeRef( | 7181 checkUnresolvedTypeRef( |
(...skipping 21 matching lines...) Expand all Loading... |
7170 expect(unlinkedUnits[0].publicNamespace.names[0].kind, | 7203 expect(unlinkedUnits[0].publicNamespace.names[0].kind, |
7171 ReferenceKind.topLevelPropertyAccessor); | 7204 ReferenceKind.topLevelPropertyAccessor); |
7172 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'i'); | 7205 expect(unlinkedUnits[0].publicNamespace.names[0].name, 'i'); |
7173 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); | 7206 expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0); |
7174 expect(unlinkedUnits[0].publicNamespace.names[1].kind, | 7207 expect(unlinkedUnits[0].publicNamespace.names[1].kind, |
7175 ReferenceKind.topLevelPropertyAccessor); | 7208 ReferenceKind.topLevelPropertyAccessor); |
7176 expect(unlinkedUnits[0].publicNamespace.names[1].name, 'i='); | 7209 expect(unlinkedUnits[0].publicNamespace.names[1].name, 'i='); |
7177 expect(unlinkedUnits[0].publicNamespace.names[1].numTypeParameters, 0); | 7210 expect(unlinkedUnits[0].publicNamespace.names[1].numTypeParameters, 0); |
7178 } | 7211 } |
7179 | 7212 |
| 7213 test_variable_codeRange() { |
| 7214 serializeLibraryText(' int a = 1, b = 22;'); |
| 7215 List<UnlinkedVariable> variables = unlinkedUnits[0].variables; |
| 7216 _assertCodeRange(variables[0].codeRange, 1, 18); |
| 7217 _assertCodeRange(variables[1].codeRange, 1, 18); |
| 7218 } |
| 7219 |
7180 test_variable_const() { | 7220 test_variable_const() { |
7181 UnlinkedVariable variable = | 7221 UnlinkedVariable variable = |
7182 serializeVariableText('const int i = 0;', variableName: 'i'); | 7222 serializeVariableText('const int i = 0;', variableName: 'i'); |
7183 expect(variable.isConst, isTrue); | 7223 expect(variable.isConst, isTrue); |
7184 } | 7224 } |
7185 | 7225 |
7186 test_variable_documented() { | 7226 test_variable_documented() { |
7187 String text = ''' | 7227 String text = ''' |
7188 // Extra comment so doc comment offset != 0 | 7228 // Extra comment so doc comment offset != 0 |
7189 /** | 7229 /** |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7419 default: | 7459 default: |
7420 // This reference should have a dependency of 0, since it refers to | 7460 // This reference should have a dependency of 0, since it refers to |
7421 // an element that is contained within some other element. | 7461 // an element that is contained within some other element. |
7422 expect(reference.dependency, 0, | 7462 expect(reference.dependency, 0, |
7423 reason: 'Nonzero dependency for ${reference.kind}'); | 7463 reason: 'Nonzero dependency for ${reference.kind}'); |
7424 } | 7464 } |
7425 } | 7465 } |
7426 } | 7466 } |
7427 } | 7467 } |
7428 | 7468 |
| 7469 void _assertCodeRange(CodeRange codeRange, int offset, int length) { |
| 7470 expect(codeRange, isNotNull); |
| 7471 expect(codeRange.offset, offset); |
| 7472 expect(codeRange.length, length); |
| 7473 } |
| 7474 |
7429 void _assertExecutableVisible(String code, UnlinkedExecutable f, | 7475 void _assertExecutableVisible(String code, UnlinkedExecutable f, |
7430 String visibleBegin, String visibleEnd) { | 7476 String visibleBegin, String visibleEnd) { |
7431 int expectedVisibleOffset = code.indexOf(visibleBegin); | 7477 int expectedVisibleOffset = code.indexOf(visibleBegin); |
7432 int expectedVisibleLength = | 7478 int expectedVisibleLength = |
7433 code.indexOf(visibleEnd) - expectedVisibleOffset + 1; | 7479 code.indexOf(visibleEnd) - expectedVisibleOffset + 1; |
7434 expect(f.visibleOffset, expectedVisibleOffset); | 7480 expect(f.visibleOffset, expectedVisibleOffset); |
7435 expect(f.visibleLength, expectedVisibleLength); | 7481 expect(f.visibleLength, expectedVisibleLength); |
7436 } | 7482 } |
7437 | 7483 |
7438 void _assertParameterVisible( | 7484 void _assertParameterVisible( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7485 class _PrefixExpectation { | 7531 class _PrefixExpectation { |
7486 final ReferenceKind kind; | 7532 final ReferenceKind kind; |
7487 final String name; | 7533 final String name; |
7488 final String absoluteUri; | 7534 final String absoluteUri; |
7489 final String relativeUri; | 7535 final String relativeUri; |
7490 final int numTypeParameters; | 7536 final int numTypeParameters; |
7491 | 7537 |
7492 _PrefixExpectation(this.kind, this.name, | 7538 _PrefixExpectation(this.kind, this.name, |
7493 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 7539 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); |
7494 } | 7540 } |
OLD | NEW |