Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: pkg/analysis_server/test/services/index/store/split_store_test.dart

Issue 703963002: Use Element's source paths instead of URIs as a key in the index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/index/store/split_store_test.dart
diff --git a/pkg/analysis_server/test/services/index/store/split_store_test.dart b/pkg/analysis_server/test/services/index/store/split_store_test.dart
index 35372e0ae35a7e8a6893c5b399fb42bd2c23f1ff..2c394b024b0071f0df56bbdac7ebeb8a2b3513d4 100644
--- a/pkg/analysis_server/test/services/index/store/split_store_test.dart
+++ b/pkg/analysis_server/test/services/index/store/split_store_test.dart
@@ -249,7 +249,7 @@ class _FileNodeManagerTest {
Element _mockElement() {
int elementId = nextElementId++;
Element element = new MockElement();
- when(elementCodec.encode(element)).thenReturn(elementId);
+ when(elementCodec.encode(element, anyBool)).thenReturn(elementId);
when(elementCodec.decode(context, elementId)).thenReturn(element);
return element;
}
@@ -335,7 +335,7 @@ class _IndexNodeTest {
Element _mockElement() {
int elementId = nextElementId++;
Element element = new MockElement();
- when(elementCodec.encode(element)).thenReturn(elementId);
+ when(elementCodec.encode(element, anyBool)).thenReturn(elementId);
when(elementCodec.decode(context, elementId)).thenReturn(element);
return element;
}
@@ -363,7 +363,7 @@ class _LocationDataTest {
void test_newForObject() {
// prepare Element
Element element = new MockElement();
- when(elementCodec.encode(element)).thenReturn(42);
+ when(elementCodec.encode(element, anyBool)).thenReturn(42);
when(elementCodec.decode(context, 42)).thenReturn(element);
// create
Location location = new Location(element, 1, 2);
@@ -452,7 +452,7 @@ class _RelationKeyDataTest {
ElementLocation location = new ElementLocationImpl.con3(['foo', 'bar']);
when(element.location).thenReturn(location);
when(context.getElement(location)).thenReturn(element);
- when(elementCodec.encode(element)).thenReturn(elementId);
+ when(elementCodec.encode(element, anyBool)).thenReturn(elementId);
}
// prepare relationship
Relationship relationship = Relationship.getRelationship('my-relationship');
@@ -526,6 +526,7 @@ class _SplitIndexStoreTest {
when(contextA.getElement(elementLocationB)).thenReturn(elementB);
when(contextA.getElement(elementLocationC)).thenReturn(elementC);
when(contextA.getElement(elementLocationD)).thenReturn(elementD);
+ when(librarySource.fullName).thenReturn('/home/user/librarySource.dart');
when(sourceA.fullName).thenReturn('/home/user/sourceA.dart');
when(sourceB.fullName).thenReturn('/home/user/sourceB.dart');
when(sourceC.fullName).thenReturn('/home/user/sourceC.dart');
« no previous file with comments | « pkg/analysis_server/test/services/index/store/codec_test.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698