diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java index 3657e07fc70..2ab208ac459 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java @@ -191,7 +191,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTest { * @param length * @param declarator */ - private void assertSoleFileLocation(IASTNode n, String pathEndsWith, + protected void assertSoleFileLocation(IASTNode n, String pathEndsWith, int offset, int length) { IASTNodeLocation[] locations = n.getNodeLocations(); assertEquals(locations.length, 1); @@ -240,7 +240,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTest { } } - private void checkInclude(IASTPreprocessorIncludeStatement inc, String file, String code, String name, boolean system) { + protected void checkInclude(IASTPreprocessorIncludeStatement inc, String file, String code, String name, boolean system) { IASTName incName= inc.getName(); assertEquals(system, inc.isSystemInclude()); diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java index 2764ba0b062..693ffb31926 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java @@ -67,7 +67,16 @@ public class TestSourceReader { fqn = fqn.indexOf("$")==-1 ? fqn : fqn.substring(0,fqn.indexOf("$")); IPath filePath= new Path(srcRoot + '/' + fqn + ".java"); - InputStream in= FileLocator.openStream(bundle, filePath, false); + InputStream in; + try { + in = FileLocator.openStream(bundle, filePath, false); + } catch(IOException e) { + if(clazz.getSuperclass()!=null && !clazz.equals(TestCase.class)) { + return getContentsForTest(bundle, srcRoot, clazz.getSuperclass(), testName, sections); + } + throw e; + } + BufferedReader br = new BufferedReader(new InputStreamReader(in)); List contents = new ArrayList();