Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test helper methods: ProjectSetup.build(), ProblemTestUtil.assertProb…

…lemCount()
  • Loading branch information...
commit 7cb70b6fee9c5d316e4d5c0fb8e2834bf83ef086 1 parent 194e5ad
@panchenko authored
View
8 ...sts/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/AbstractProjectSetup.java
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -421,4 +422,11 @@ public TestSearchResults search(String patternString, int searchFor,
return ProblemTestUtil.findProblems(resource);
}
+ /**
+ * Performs the incremental build in this project.
+ */
+ public void build() throws CoreException {
+ get().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
+
}
View
7 core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/ProblemTestUtil.java
@@ -80,6 +80,13 @@ public static void assertNoProblems(IFile file) throws CoreException {
}
/**
+ * Asserts the expected number of problems in the specified array.
+ */
+ public static void assertProblemCount(int expectedCount, IMarker[] problems) {
+ assertEquals(toString(problems), expectedCount, problems.length);
+ }
+
+ /**
* Returns string representation of the specified problem marker.
*/
public static String toString(IMarker marker) {
Please sign in to comment.
Something went wrong with that request. Please try again.