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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java

Issue 11787017: Initial implementation of MemoryIndexStoreImpl and IndexContributor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update for review comments Created 7 years, 11 months 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java
index 6b42a5184464674fe42bb786ebef04e683c36eb7..4790de918afd6ac65e508ad99456f0a4255f927d 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/index/LocationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, the Dart project authors.
+ * Copyright (c) 2013, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
@@ -14,18 +14,18 @@
package com.google.dart.engine.index;
import com.google.dart.engine.EngineTestCase;
-import com.google.dart.engine.element.ElementLocation;
+import com.google.dart.engine.element.ElementProxy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class LocationTest extends EngineTestCase {
public void test_new() throws Exception {
- ElementLocation elementLocation = mock(ElementLocation.class);
- when(elementLocation.toString()).thenReturn("myElement");
+ ElementProxy element = mock(ElementProxy.class);
+ when(element.toString()).thenReturn("myElement");
// test Location
- Location location = new Location(elementLocation, 1, 2, null);
- assertSame(elementLocation, location.getElementLocation());
+ Location location = new Location(element, 1, 2, null);
+ assertSame(element, location.getElement());
assertEquals(1, location.getOffset());
assertEquals(2, location.getLength());
assertSame(null, location.getImportPrefix());
@@ -41,11 +41,12 @@ public class LocationTest extends EngineTestCase {
}
public void test_new_withPrefix() throws Exception {
- ElementLocation elementLocation = mock(ElementLocation.class);
- when(elementLocation.toString()).thenReturn("myElement");
+ ElementProxy element = mock(ElementProxy.class);
+ when(element.toString()).thenReturn("myElement");
+ when(element.toString()).thenReturn("myElement");
// test Location
- Location location = new Location(elementLocation, 1, 2, "pref");
- assertSame(elementLocation, location.getElementLocation());
+ Location location = new Location(element, 1, 2, "pref");
+ assertSame(element, location.getElement());
assertEquals(1, location.getOffset());
assertEquals(2, location.getLength());
assertEquals("pref", location.getImportPrefix());

Powered by Google App Engine
This is Rietveld 408576698