1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix broken tests.

This commit is contained in:
John Camelon 2005-04-19 20:38:41 +00:00
parent f922e4880f
commit 8858cc1fd3
2 changed files with 12 additions and 4 deletions

View file

@ -577,6 +577,7 @@ public class SourceIndexerTests extends TestCase implements IIndexChangeListener
public void testExactDeclarations() throws Exception public void testExactDeclarations() throws Exception
{ {
//TODO Bogdan - you may want to import c.h here a.h includes it! - JC
importFile("a.h","resources/dependency/a.h");//$NON-NLS-1$ //$NON-NLS-2$ importFile("a.h","resources/dependency/a.h");//$NON-NLS-1$ //$NON-NLS-2$
//Make sure project got added to index //Make sure project got added to index

View file

@ -120,11 +120,18 @@ public class ParserUtil
if( root.getLocation().isPrefixOf( path ) ) if( root.getLocation().isPrefixOf( path ) )
path = path.removeFirstSegments(root.getLocation().segmentCount() ); path = path.removeFirstSegments(root.getLocation().segmentCount() );
IResource resultingResource = root.getFile(path); try
{
IFile resultingResource = root.getFile(path);
if( resultingResource != null && resultingResource.exists() ) if( resultingResource != null && resultingResource.exists() )
return resultingResource; return resultingResource;
return null; return null;
} }
catch( IllegalArgumentException iae ) //thrown on invalid paths
{
return null;
}
}
/** /**
* @param resultingResource * @param resultingResource