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

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

Issue 14712011: Version 0.5.7.3 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 7 years, 7 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/internal/index/IndexContributorTest.java
===================================================================
--- editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/index/IndexContributorTest.java (revision 22658)
+++ editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/index/IndexContributorTest.java (working copy)
@@ -200,43 +200,6 @@
private IndexStore store = mock(IndexStore.class);
private IndexContributor index = new IndexContributor(store);
- /**
- * TODO(scheglov) enable this test after analyzer fix
- * <p>
- * https://code.google.com/p/dart/issues/detail?id=10521
- */
- public void fail_isReferencedBy_ImportElement_withPrefix() throws Exception {
- setFileContent(
- "Lib.dart",
- makeSource(
- "// filler filler filler filler filler filler filler filler filler filler",
- "library lib;",
- "var myVar;"));
- parseTestUnit(
- "// filler filler filler filler filler filler filler filler filler filler",
- "import 'Lib.dart' as pref;",
- "main() {",
- " pref.myVar = 1;",
- "}",
- "");
- // set elements
- Element mainElement = findElement("main(");
- ImportElement importElement = (ImportElement) findNode(
- "import 'Lib.dart",
- ImportDirective.class).getElement();
- // index
- index.visitCompilationUnit(testUnit);
- // verify
- // TODO(scheglov) we have problem - PrefixElement recorded for "pref" and we don't know
- // which ImportElement it is.
-// List<RecordedRelation> relations = captureRecordedRelations();
-// assertRecordedRelation(
-// relations,
-// importElement,
-// IndexConstants.IS_REFERENCED_BY,
-// new ExpectedLocation(mainElement, findOffset("pref.myVar"), "pref"));
- }
-
public void test_createElementLocation() throws Exception {
ElementLocation elementLocation = mock(ElementLocation.class);
Element element = mockElement(Element.class, elementLocation, 42, "myName");
@@ -908,6 +871,43 @@
new ExpectedLocation(mainElement, findOffset("myVar = 1"), ""));
}
+ /**
+ * TODO(scheglov) enable this test after analyzer fix
+ * <p>
+ * https://code.google.com/p/dart/issues/detail?id=10521
+ */
+ public void test_isReferencedBy_ImportElement_withPrefix() throws Exception {
+ setFileContent(
+ "Lib.dart",
+ makeSource(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "library lib;",
+ "var myVar;"));
+ parseTestUnit(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "import 'Lib.dart' as pref;",
+ "main() {",
+ " pref.myVar = 1;",
+ "}",
+ "");
+ // set elements
+ Element mainElement = findElement("main(");
+ ImportElement importElement = (ImportElement) findNode(
+ "import 'Lib.dart",
+ ImportDirective.class).getElement();
+ // index
+ index.visitCompilationUnit(testUnit);
+ // verify
+ // TODO(scheglov) we have problem - PrefixElement recorded for "pref" and we don't know
+ // which ImportElement it is.
+// List<RecordedRelation> relations = captureRecordedRelations();
+// assertRecordedRelation(
+// relations,
+// importElement,
+// IndexConstants.IS_REFERENCED_BY,
+// new ExpectedLocation(mainElement, findOffset("pref.myVar"), "pref"));
+ }
+
public void test_isReferencedBy_LabelElement() throws Exception {
parseTestUnit(
"// filler filler filler filler filler filler filler filler filler filler",

Powered by Google App Engine
This is Rietveld 408576698