mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
Fixed junit tests failing on Linux.
This commit is contained in:
parent
1221c4b9a0
commit
f20d5d974c
1 changed files with 7 additions and 7 deletions
|
@ -65,7 +65,7 @@ public class IndexLocationTest extends BaseTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
for(Iterator i= projects.iterator(); i.hasNext(); ) {
|
for (Iterator i= projects.iterator(); i.hasNext(); ) {
|
||||||
ICProject ptd= (ICProject) i.next();
|
ICProject ptd= (ICProject) i.next();
|
||||||
if (ptd != null) {
|
if (ptd != null) {
|
||||||
ptd.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
|
ptd.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
|
||||||
|
@ -257,7 +257,7 @@ public class IndexLocationTest extends BaseTestCase {
|
||||||
};
|
};
|
||||||
IContainer root= ResourcesPlugin.getWorkspace().getRoot();
|
IContainer root= ResourcesPlugin.getWorkspace().getRoot();
|
||||||
// loc -uri-> raw -project-> loc
|
// loc -uri-> raw -project-> loc
|
||||||
for(int i=0; i<paths.length; i++) {
|
for (int i= 0; i < paths.length; i++) {
|
||||||
IIndexFileLocation ifl1 = IndexLocationFactory.getExternalIFL(paths[i]);
|
IIndexFileLocation ifl1 = IndexLocationFactory.getExternalIFL(paths[i]);
|
||||||
URIRelativeLocationConverter urlc = new URIRelativeLocationConverter(base);
|
URIRelativeLocationConverter urlc = new URIRelativeLocationConverter(base);
|
||||||
String r1 = urlc.toInternalFormat(ifl1);
|
String r1 = urlc.toInternalFormat(ifl1);
|
||||||
|
@ -291,10 +291,10 @@ public class IndexLocationTest extends BaseTestCase {
|
||||||
"/"+cproject.getProject().getName()+"/a /b /c.d",
|
"/"+cproject.getProject().getName()+"/a /b /c.d",
|
||||||
"/"+cproject.getProject().getName()+"/a b c/d-e/f.g"
|
"/"+cproject.getProject().getName()+"/a b c/d-e/f.g"
|
||||||
};
|
};
|
||||||
URI base = URI.create("file:/" + basePath);
|
URI base = URI.create("file://" + basePath);
|
||||||
URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
|
URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
|
||||||
// loc -project-> raw -uri-> loc
|
// loc -project-> raw -uri-> loc
|
||||||
for(int i=0; i<paths.length; i++) {
|
for (int i= 0; i < paths.length; i++) {
|
||||||
IFile file= cproject.getProject().getFile(paths[i]);
|
IFile file= cproject.getProject().getFile(paths[i]);
|
||||||
IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
|
IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
|
||||||
ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(cproject.getProject());
|
ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(cproject.getProject());
|
||||||
|
@ -329,9 +329,9 @@ public class IndexLocationTest extends BaseTestCase {
|
||||||
linkedFolder.getFullPath()+"/a b c/d-e/f.g"
|
linkedFolder.getFullPath()+"/a b c/d-e/f.g"
|
||||||
};
|
};
|
||||||
// loc -project-> raw -uri-> loc
|
// loc -project-> raw -uri-> loc
|
||||||
URI base = URI.create("file:/" + basePath);
|
URI base = URI.create("file://" + basePath);
|
||||||
URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
|
URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
|
||||||
for(int i=0; i<paths.length; i++) {
|
for (int i= 0; i < paths.length; i++) {
|
||||||
IFile file= linkedFolder.getFile(paths[i]);
|
IFile file= linkedFolder.getFile(paths[i]);
|
||||||
IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
|
IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
|
||||||
ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(linkedFolder);
|
ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(linkedFolder);
|
||||||
|
@ -347,7 +347,7 @@ public class IndexLocationTest extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteOnTearDown(ICProject cproject) {
|
private void deleteOnTearDown(ICProject cproject) {
|
||||||
if(cproject!=null) {
|
if (cproject!=null) {
|
||||||
projects.add(cproject);
|
projects.add(cproject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue