mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
test fix
This commit is contained in:
parent
68aa1d5408
commit
b7eb6a93b0
1 changed files with 7 additions and 6 deletions
|
@ -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 "};
|
||||
|
|
Loading…
Add table
Reference in a new issue