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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTestCase.java

Issue 587743002: Version 1.7.0-dev.3.2 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 3 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.services_test/src/com/google/dart/engine/services/completion/CompletionTestCase.java
===================================================================
--- editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTestCase.java (revision 40507)
+++ editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTestCase.java (working copy)
@@ -5,9 +5,14 @@
import com.google.dart.engine.context.AnalysisContext;
import com.google.dart.engine.context.AnalysisException;
import com.google.dart.engine.element.CompilationUnitElement;
+import com.google.dart.engine.element.Element;
import com.google.dart.engine.element.LibraryElement;
import com.google.dart.engine.index.Index;
import com.google.dart.engine.index.IndexFactory;
+import com.google.dart.engine.index.Location;
+import com.google.dart.engine.index.Relationship;
+import com.google.dart.engine.index.RelationshipCallback;
+import com.google.dart.engine.internal.index.IndexConstants;
import com.google.dart.engine.internal.index.file.MemoryNodeManager;
import com.google.dart.engine.resolver.ResolverTestCase;
import com.google.dart.engine.search.SearchEngine;
@@ -35,7 +40,6 @@
}
protected Index index;
-
protected SearchEngine searchEngine;
@Override
@@ -46,6 +50,7 @@
@Override
public void run() {
index.run();
+ index = null;
}
}.start();
searchEngine = SearchEngineFactory.createSearchEngine(index);
@@ -75,6 +80,21 @@
return libraryUnit;
}
+ @Override
+ protected void tearDown() throws Exception {
+ index.getRelationships(
+ IndexConstants.UNIVERSE,
+ IndexConstants.IS_READ_BY,
+ new RelationshipCallback() {
+ @Override
+ public void hasRelationships(Element a, Relationship b, Location[] c) {
+ index.stop();
+ }
+ });
+ searchEngine = null;
+ super.tearDown();
+ }
+
/**
* Run a set of completion tests on the given <code>originalSource</code>. The source string has
* completion points embedded in it, which are identified by '!X' where X is a single character.

Powered by Google App Engine
This is Rietveld 408576698