1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
This commit is contained in:
Mikhail Sennikovsky 2007-06-15 16:12:22 +00:00
parent 68aa1d5408
commit b7eb6a93b0

View file

@ -46,6 +46,7 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
import org.eclipse.cdt.managedbuilder.internal.core.Option;
import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@ -234,15 +235,15 @@ public class ManagedBuildCoreTests20 extends TestCase {
final String[] expectedPaths = new String[5];
// This first path is a built-in, so it will not be manipulated by build manager
expectedPaths[0] = (new Path("\\usr\\include")).toOSString();
expectedPaths[1] = (new Path("\\opt\\gnome\\include")).toOSString();
IPath path = new Path("C:\\home\\tester\\include");
expectedPaths[0] = (new Path("/usr/include")).toOSString();
expectedPaths[1] = (new Path("/opt/gnome/include")).toOSString();
IPath path = new Path("C:/home/tester/include");
if(path.isAbsolute()) // for win32 path is treated as absolute
expectedPaths[2] = path.toOSString();
else // for Linux path is relative
expectedPaths[2] = project.getLocation().append("Sub Config").append(path).toOSString();
expectedPaths[3] = project.getLocation().append( "includes" ).toOSString();
expectedPaths[4] = (new Path("\\usr\\gnu\\include")).toOSString();
expectedPaths[4] = (new Path("/usr/gnu/include")).toOSString();
// Create a new managed project based on the sub project type
IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.sub");
@ -310,7 +311,7 @@ public class ManagedBuildCoreTests20 extends TestCase {
assertEquals((String)definedSymbols.get("GNOME"), "ME");
// Test the includes path
String[] actualPaths = info.getIncludePaths();
assertTrue(Arrays.equals(expectedPaths, actualPaths));
BuildSystemTestHelper.checkDiff(expectedPaths, actualPaths);
}
});
@ -323,7 +324,7 @@ public class ManagedBuildCoreTests20 extends TestCase {
assertEquals((String)currentSymbols.get("BUILTIN"), "");
String[] currentPaths = currentSettings.getIncludePaths();
assertTrue(Arrays.equals(expectedPaths, currentPaths));
BuildSystemTestHelper.checkDiff(expectedPaths, currentPaths);
// Add some defined symbols programmatically
String[] expectedSymbols = {"DEBUG", "GNOME = ME "};