| 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());
|
|
|