1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 524338 - Make sure SemanticHighlightingTest.teardown() is called even if an exception was thrown during the test run

Change-Id: Idd19728c2e920d1bb8a590863c40d8646f916e1a
This commit is contained in:
Nathan Ridge 2017-09-26 13:57:03 -04:00
parent 33d33a8cd6
commit c7e475e50e

View file

@ -184,9 +184,7 @@ public class SemanticHighlightingTest extends TestCase {
return document.getPositions(positionCategory);
}
private void makeAssertions(boolean isCpp) throws Exception {
setup(isCpp);
private void doMakeAssertions() throws Exception {
IDocument document = fSourceViewer.getDocument();
int lines = document.getNumberOfLines();
@ -217,8 +215,15 @@ public class SemanticHighlightingTest extends TestCase {
}
assertEqualMaps(actual, expected);
}
teardown();
private void makeAssertions(boolean isCpp) throws Exception {
setup(isCpp);
try {
doMakeAssertions();
} finally {
teardown();
}
}
private void makeAssertions() throws Exception {