| 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.store.split_store; | 5 library test.services.src.index.store.split_store; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_services/index/index.dart'; | 9 import 'package:analysis_services/index/index.dart'; |
| 10 import 'package:analysis_services/src/index/store/codec.dart'; | 10 import 'package:analysis_services/src/index/store/codec.dart'; |
| 11 import 'package:analysis_services/src/index/store/memory_node_manager.dart'; | 11 import 'package:analysis_services/src/index/store/memory_node_manager.dart'; |
| 12 import 'package:analysis_services/src/index/store/split_store.dart'; | 12 import 'package:analysis_services/src/index/store/split_store.dart'; |
| 13 import 'package:analysis_testing/mocks.dart'; | 13 import 'package:analysis_testing/mocks.dart'; |
| 14 import 'package:analysis_testing/reflective_tests.dart'; | 14 import 'package:analysis_testing/reflective_tests.dart'; |
| 15 import 'package:analyzer/src/generated/element.dart'; | 15 import 'package:analyzer/src/generated/element.dart'; |
| 16 import 'package:analyzer/src/generated/engine.dart'; | 16 import 'package:analyzer/src/generated/engine.dart'; |
| 17 import 'package:analyzer/src/generated/source.dart'; | 17 import 'package:analyzer/src/generated/source.dart'; |
| 18 import 'package:typed_mock/typed_mock.dart'; | 18 import 'package:typed_mock/typed_mock.dart'; |
| 19 import 'package:unittest/unittest.dart'; | 19 import 'package:unittest/unittest.dart'; |
| 20 | 20 |
| 21 import 'mocks.dart'; | 21 import 'mocks.dart'; |
| 22 import 'single_source_container.dart'; | 22 import 'single_source_container.dart'; |
| 23 | 23 |
| 24 | 24 |
| 25 main() { | 25 main() { |
| 26 groupSep = ' | '; | 26 groupSep = ' | '; |
| 27 group('FileNodeManager', () { | 27 runReflectiveTests(_FileNodeManagerTest); |
| 28 runReflectiveTests(_FileNodeManagerTest); | 28 runReflectiveTests(_IndexNodeTest); |
| 29 }); | 29 runReflectiveTests(_LocationDataTest); |
| 30 group('IndexNode', () { | 30 runReflectiveTests(_RelationKeyDataTest); |
| 31 runReflectiveTests(_IndexNodeTest); | 31 runReflectiveTests(_SplitIndexStoreTest); |
| 32 }); | |
| 33 group('LocationData', () { | |
| 34 runReflectiveTests(_LocationDataTest); | |
| 35 }); | |
| 36 group('RelationKeyData', () { | |
| 37 runReflectiveTests(_RelationKeyDataTest); | |
| 38 }); | |
| 39 group('SplitIndexStore', () { | |
| 40 runReflectiveTests(_SplitIndexStoreTest); | |
| 41 }); | |
| 42 } | 32 } |
| 43 | 33 |
| 44 | 34 |
| 45 void _assertHasLocationQ(List<Location> locations, Element element, int offset, | 35 void _assertHasLocationQ(List<Location> locations, Element element, int offset, |
| 46 int length) { | 36 int length) { |
| 47 _assertHasLocation(locations, element, offset, length, isQualified: true); | 37 _assertHasLocation(locations, element, offset, length, isQualified: true); |
| 48 } | 38 } |
| 49 | 39 |
| 50 | 40 |
| 51 void _assertHasLocation(List<Location> locations, Element element, int offset, | 41 void _assertHasLocation(List<Location> locations, Element element, int offset, |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 * Wraps the given locations into [LocationEqualsWrapper]. | 1122 * Wraps the given locations into [LocationEqualsWrapper]. |
| 1133 */ | 1123 */ |
| 1134 static List<_LocationEqualsWrapper> wrapLocations(List<Location> locations) { | 1124 static List<_LocationEqualsWrapper> wrapLocations(List<Location> locations) { |
| 1135 List<_LocationEqualsWrapper> wrappers = <_LocationEqualsWrapper>[]; | 1125 List<_LocationEqualsWrapper> wrappers = <_LocationEqualsWrapper>[]; |
| 1136 for (Location location in locations) { | 1126 for (Location location in locations) { |
| 1137 wrappers.add(new _LocationEqualsWrapper(location)); | 1127 wrappers.add(new _LocationEqualsWrapper(location)); |
| 1138 } | 1128 } |
| 1139 return wrappers; | 1129 return wrappers; |
| 1140 } | 1130 } |
| 1141 } | 1131 } |
| OLD | NEW |