1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Pass exceptions up the stack

Make sure not to lose stack trace when a test fails.

Part of #117
This commit is contained in:
Jonah Graham 2022-10-28 10:29:56 -04:00
parent 75e52e4682
commit 1cdf58a663
2 changed files with 2 additions and 8 deletions

View file

@ -265,7 +265,7 @@ public class CProjectHelper {
System.runFinalization(); System.runFinalization();
cproject.getProject().delete(true, true, null); cproject.getProject().delete(true, true, null);
} catch (CoreException e2) { } catch (CoreException e2) {
Assert.fail(getMessage(e2.getStatus())); throw new AssertionError("Failed to delete project", e2);
} }
} }
} }

View file

@ -39,7 +39,6 @@ import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.part.FileEditorInput;
@ -108,12 +107,7 @@ public abstract class BaseSelectionTests extends BaseUITestCase {
throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$ throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart part = null; IEditorPart part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$
try {
part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$
} catch (PartInitException e) {
assertFalse(true);
}
if (part instanceof CEditor) { if (part instanceof CEditor) {
CEditor editor = (CEditor) part; CEditor editor = (CEditor) part;