| Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
|
| index a838a55b8fba0c1585180b096a47a4a62d73ae35..c55b07dda8e78807771dd51e2a93b1d7f47bfbb8 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
|
| @@ -13,6 +13,8 @@
|
| */
|
| package com.google.dart.tools.core.utilities.ast;
|
|
|
| +import static org.fest.assertions.Assertions.assertThat;
|
| +
|
| import com.google.common.base.Joiner;
|
| import com.google.common.collect.Lists;
|
| import com.google.dart.compiler.DartCompilationError;
|
| @@ -34,8 +36,6 @@ import junit.framework.TestCase;
|
|
|
| import org.eclipse.core.resources.IResource;
|
|
|
| -import static org.fest.assertions.Assertions.assertThat;
|
| -
|
| import java.util.List;
|
|
|
| /**
|
| @@ -404,6 +404,41 @@ public class DartElementLocatorTest extends TestCase {
|
| 4);
|
| }
|
|
|
| + // XXX
|
| + public void test_LibraryUnit_onPartOf() throws Exception {
|
| + TestProject testProject = new TestProject("Test");
|
| + try {
|
| + IResource libResourceA = testProject.setUnitContent(
|
| + "Lib.dart",
|
| + Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "library my.lib;",
|
| + "part 'Test.dart';",
|
| + "")).getResource();
|
| + testProject.setUnitContent(
|
| + "Test.dart",
|
| + Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "part of my.lib;",
|
| + ""));
|
| + TestProject.waitForAutoBuild();
|
| + DartLibrary library = testProject.getDartProject().getDartLibrary(libResourceA);
|
| + CompilationUnit testUnit = library.getCompilationUnit("Test.dart");
|
| + // usage of "aaa" = "libraryA"
|
| + {
|
| + DartElement element = assertLocation(
|
| + testUnit,
|
| + "my.lib",
|
| + CompilationUnit.class,
|
| + "library my.lib);",
|
| + 0);
|
| + assertSame(library.getDefiningCompilationUnit(), element);
|
| + }
|
| + } finally {
|
| + testProject.dispose();
|
| + }
|
| + }
|
| +
|
| public void test_Method_call() throws Exception {
|
| testElementLocator(
|
| formatLines(
|
|
|