mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
bug 396411: JUnit failure, correction of expected results for Unix
This commit is contained in:
parent
cce302595e
commit
e58a3323c8
1 changed files with 31 additions and 11 deletions
|
@ -51,9 +51,11 @@ import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -232,21 +234,39 @@ public class ManagedBuildCoreTests20 extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
//These are the expected path settings
|
//These are the expected path settings
|
||||||
final String[] expectedPaths = {
|
IPath buildCWD = project.getLocation().append("Sub Config");
|
||||||
toOSString("/usr/include"),
|
|
||||||
toOSString("/opt/gnome/include"),
|
final String[] expectedPaths;
|
||||||
toOSString("C:\\home\\tester/include"),
|
if (new Path("C:\\home\\tester/include").isAbsolute()) {
|
||||||
// relative path makes 2 entries
|
// Windows
|
||||||
project.getLocation().append("includes").toOSString(),
|
expectedPaths = new String[] {
|
||||||
"includes",
|
toOSString("/usr/include"),
|
||||||
"/usr/gnu/include", // This one set to ICSettingEntry.RESOLVED
|
toOSString("/opt/gnome/include"),
|
||||||
};
|
toOSString("C:\\home\\tester/include"),
|
||||||
|
// relative paths make 2 entries
|
||||||
|
project.getLocation().append("includes").toOSString(),
|
||||||
|
"includes", // FIXME this is incorrect, the original entry set via extension point is "../includes"
|
||||||
|
"/usr/gnu/include", // Not converted to OS string due to being flagged as ICSettingEntry.RESOLVED
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// Unix
|
||||||
|
expectedPaths = new String[] {
|
||||||
|
toOSString("/usr/include"),
|
||||||
|
toOSString("/opt/gnome/include"),
|
||||||
|
// relative paths make 2 entries
|
||||||
|
buildCWD.append("C:\\home\\tester/include").toOSString(),
|
||||||
|
"C:\\home\\tester/include",
|
||||||
|
project.getLocation().append("includes").toOSString(),
|
||||||
|
"includes", // FIXME this is incorrect, the original entry set via extension point is "../includes"
|
||||||
|
"/usr/gnu/include", // Not converted to OS string due to being flagged as ICSettingEntry.RESOLVED
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new managed project based on the sub project type
|
// Create a new managed project based on the sub project type
|
||||||
IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.sub");
|
IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.sub");
|
||||||
assertNotNull(projType);
|
assertNotNull(projType);
|
||||||
|
|
||||||
// Create the managed-project (.cdtbuild) for our project
|
// Create the managed-project for our project
|
||||||
IManagedProject newProject = null;
|
IManagedProject newProject = null;
|
||||||
try {
|
try {
|
||||||
newProject = ManagedBuildManager.createManagedProject(project, projType);
|
newProject = ManagedBuildManager.createManagedProject(project, projType);
|
||||||
|
@ -527,7 +547,7 @@ public class ManagedBuildCoreTests20 extends TestCase {
|
||||||
IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.root");
|
IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.root");
|
||||||
assertNotNull(projType);
|
assertNotNull(projType);
|
||||||
|
|
||||||
// Create the managed-project (.cdtbuild) for our project that builds a dummy executable
|
// Create the managed-project for our project that builds a dummy executable
|
||||||
IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
|
IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
|
||||||
assertEquals(newProject.getName(), projType.getName());
|
assertEquals(newProject.getName(), projType.getName());
|
||||||
assertFalse(newProject.equals(projType));
|
assertFalse(newProject.equals(projType));
|
||||||
|
|
Loading…
Add table
Reference in a new issue