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

Fixed tests to pass on M6 & M7.

Inclusions were not being found as path info was incorrect.
This commit is contained in:
John Camelon 2004-02-16 05:02:21 +00:00
parent 5fe505bacb
commit 0fbb671b39
2 changed files with 6 additions and 3 deletions

View file

@ -32,7 +32,6 @@ import org.eclipse.cdt.internal.core.search.matching.OrPattern;
import org.eclipse.cdt.testplugin.CTestPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
/**
* @author aniefer

View file

@ -10,6 +10,7 @@
***********************************************************************/
package org.eclipse.cdt.core.search.tests;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
@ -35,6 +36,7 @@ public class ParseTestOnSearchFiles extends TestCase
{
private FileInputStream fileIn;
private String name;
private String fullPathName;
/**
*
*/
@ -52,13 +54,15 @@ public class ParseTestOnSearchFiles extends TestCase
protected void setUp() throws Exception {
name = "resources/search/classDecl.cpp";
fileIn = new FileInputStream(CTestPlugin.getDefault().getFileInPlugin(new Path(name)));
File f = CTestPlugin.getDefault().getFileInPlugin(new Path(name));
fullPathName = f.getAbsolutePath();
fileIn = new FileInputStream(f);
}
public void testParseOfAndrewsFile() throws Exception
{
ISourceElementRequestor requestor = new NullSourceElementRequestor();
IScanner scanner = ParserFactory.createScanner( new InputStreamReader( fileIn ), name, new ScannerInfo(), ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, requestor, new NullLogService() );
IScanner scanner = ParserFactory.createScanner( new InputStreamReader( fileIn ), fullPathName, new ScannerInfo(), ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, requestor, new NullLogService() );
IParser parser = ParserFactory.createParser( scanner, requestor, ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, null );
assertTrue( parser.parse() );
}