Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2015-02-22 22:06:50 -0500
committerAlena Laskavaia2015-02-22 22:06:50 -0500
commit8968b8f2ca921389bc0d8332d05deb0798232c7a (patch)
tree7f8a7c5dbf337bda460517f8e1b847c54443dc22 /codan/org.eclipse.cdt.codan.core.test
parent3e7f1d284b97d128a363c7bd5f466a81e5ab4c51 (diff)
downloadorg.eclipse.cdt-8968b8f2ca921389bc0d8332d05deb0798232c7a.tar.gz
org.eclipse.cdt-8968b8f2ca921389bc0d8332d05deb0798232c7a.tar.xz
org.eclipse.cdt-8968b8f2ca921389bc0d8332d05deb0798232c7a.zip
codan - code cleanup
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/TestUtils.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixTestCase.java2
3 files changed, 5 insertions, 2 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
index 885c9415d5..22107d096e 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
@@ -84,7 +84,7 @@ public class CodanTestCase extends BaseTestCase {
}
@Override
- public void tearDown() throws CoreException {
+ public void tearDown() throws Exception {
if (cproject != null) {
try {
cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
@@ -92,6 +92,7 @@ public class CodanTestCase extends BaseTestCase {
throw e;
}
}
+ super.tearDown();
}
/**
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/TestUtils.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/TestUtils.java
index 6417d4f6cb..59a93cea19 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/TestUtils.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/TestUtils.java
@@ -61,6 +61,8 @@ public class TestUtils {
InputStream st = null;
if (plugin != null) {
URL resource = plugin.getBundle().getResource(srcRoot + "/" + classFile);
+ if (resource == null)
+ throw new IOException("Cannot find file " + srcRoot + "/" + classFile + " in bundle " + plugin.getBundle().getBundleId());
st = resource.openStream();
} else {
st = clazz.getResourceAsStream("/" + classFile);
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixTestCase.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixTestCase.java
index cae78762be..29f2ea1e3d 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixTestCase.java
@@ -80,7 +80,7 @@ public abstract class QuickFixTestCase extends CheckerTestCase {
}
@Override
- public void tearDown() throws CoreException {
+ public void tearDown() throws Exception {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {

Back to the top