| 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 test.services.src.index.dart_index_contributor; | 5 library test.services.src.index.dart_index_contributor; |
| 6 | 6 |
| 7 import 'package:analysis_server/analysis/index/index_core.dart'; | 7 import 'package:analysis_server/analysis/index/index_core.dart'; |
| 8 import 'package:analysis_server/src/services/index/index.dart'; | 8 import 'package:analysis_server/src/services/index/index.dart'; |
| 9 import 'package:analysis_server/src/services/index/index_contributor.dart'; | 9 import 'package:analysis_server/src/services/index/index_contributor.dart'; |
| 10 import 'package:analysis_server/src/services/index/index_store.dart'; | 10 import 'package:analysis_server/src/services/index/index_store.dart'; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 LocationImpl location) { | 72 LocationImpl location) { |
| 73 recordedRelations | 73 recordedRelations |
| 74 .add(new RecordedRelation(indexable, relationship, location)); | 74 .add(new RecordedRelation(indexable, relationship, location)); |
| 75 }); | 75 }); |
| 76 when(store.recordTopLevelDeclaration(anyObject)) | 76 when(store.recordTopLevelDeclaration(anyObject)) |
| 77 .thenInvoke((Element element) { | 77 .thenInvoke((Element element) { |
| 78 recordedTopElements.add(element); | 78 recordedTopElements.add(element); |
| 79 }); | 79 }); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void test_bad_unresolvedFieldFormalParameter() { |
| 83 verifyNoTestUnitErrors = false; |
| 84 _indexTestUnit(''' |
| 85 class Test { |
| 86 final field; |
| 87 Test(this.fie); |
| 88 }'''); |
| 89 } |
| 90 |
| 82 void test_definesClass() { | 91 void test_definesClass() { |
| 83 _indexTestUnit('class A {}'); | 92 _indexTestUnit('class A {}'); |
| 84 // prepare elements | 93 // prepare elements |
| 85 ClassElement classElement = findElement("A"); | 94 ClassElement classElement = findElement("A"); |
| 86 // verify | 95 // verify |
| 87 _assertDefinesTopLevelElement(classElement); | 96 _assertDefinesTopLevelElement(classElement); |
| 88 } | 97 } |
| 89 | 98 |
| 90 void test_definesClassAlias() { | 99 void test_definesClassAlias() { |
| 91 _indexTestUnit(''' | 100 _indexTestUnit(''' |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 | 1565 |
| 1557 RecordedRelation(this.indexable, this.relationship, this.location); | 1566 RecordedRelation(this.indexable, this.relationship, this.location); |
| 1558 | 1567 |
| 1559 @override | 1568 @override |
| 1560 String toString() { | 1569 String toString() { |
| 1561 return 'RecordedRelation(indexable=$indexable; relationship=$relationship; ' | 1570 return 'RecordedRelation(indexable=$indexable; relationship=$relationship; ' |
| 1562 'location=$location; flags=' '${location.isQualified ? "Q" : ""}' | 1571 'location=$location; flags=' '${location.isQualified ? "Q" : ""}' |
| 1563 '${location.isResolved ? "R" : ""})'; | 1572 '${location.isResolved ? "R" : ""})'; |
| 1564 } | 1573 } |
| 1565 } | 1574 } |
| OLD | NEW |