|
|
|
@ -417,8 +417,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry("/path0", 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
|
assertEquals(expected.getValue(), entry.getValue());
|
|
|
|
@ -469,46 +468,45 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file1, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file2, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file3, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file4, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file5, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file6, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file7, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file8, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file9, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file10, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -549,40 +547,18 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry("/path0", 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
|
assertEquals(expected.getValue(), entry.getValue());
|
|
|
|
|
assertEquals(expected.getKind(), entry.getKind());
|
|
|
|
|
assertEquals(expected.getFlags(), entry.getFlags());
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path1").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(1);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path with spaces").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(2);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path with spaces2").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(3);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path with spaces3").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(4);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path1", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path with spaces", 0), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path with spaces2", 0), entries.get(3));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path with spaces3", 0), entries.get(4));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -616,18 +592,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Framework").setDevice(project.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, ICSettingEntry.FRAMEWORKS_MAC), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/framework/system").setDevice(project.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, ICSettingEntry.FRAMEWORKS_MAC), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Framework with spaces").setDevice(project.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, ICSettingEntry.FRAMEWORKS_MAC), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Framework", ICSettingEntry.FRAMEWORKS_MAC), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/framework/system", ICSettingEntry.FRAMEWORKS_MAC), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Framework with spaces", ICSettingEntry.FRAMEWORKS_MAC), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -663,7 +630,6 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO0", "", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
@ -671,42 +637,14 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
assertEquals(expected.getKind(), entry.getKind());
|
|
|
|
|
assertEquals(expected.getFlags(), entry.getFlags());
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO1", "value", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(1);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO2", "value with spaces", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(2);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO3", "value with spaces", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(3);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO4", "\"quoted value\"", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(4);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO5", "\"quoted value\"", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(5);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO6", "\"escape-quoted value\"", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(6);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CMacroEntry expected = new CMacroEntry("MACRO7", "'single-quoted value'", 0);
|
|
|
|
|
CMacroEntry entry = (CMacroEntry)entries.get(7);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO1", "value", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO2", "value with spaces", 0), entries.get(2));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO3", "value with spaces", 0), entries.get(3));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO4", "\"quoted value\"", 0), entries.get(4));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO5", "\"quoted value\"", 0), entries.get(5));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO6", "\"escape-quoted value\"", 0), entries.get(6));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO7", "'single-quoted value'", 0), entries.get(7));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -735,10 +673,8 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO", null, ICSettingEntry.UNDEFINED), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Parse variations of -include options.
|
|
|
|
@ -770,27 +706,19 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath incFile = new Path("/include.file1").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CIncludeFileEntry expected = new CIncludeFileEntry(incFile, 0);
|
|
|
|
|
CIncludeFileEntry expected = new CIncludeFileEntry("/include.file1", 0);
|
|
|
|
|
CIncludeFileEntry entry = (CIncludeFileEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
|
assertEquals(expected.getValue(), entry.getValue());
|
|
|
|
|
assertEquals(expected.getKind(), entry.getKind());
|
|
|
|
|
assertEquals(expected.getFlags(), entry.getFlags());
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
IPath incFile = new Path("/include.file with spaces").setDevice(project.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludeFileEntry(incFile, 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludeFileEntry("/include.file with spaces", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludeFileEntry(project.getLocation().removeLastSegments(2).append("include.file2"), 0), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludeFileEntry(project.getFullPath().append("include.file3"), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(3));
|
|
|
|
|
assertEquals(new CIncludeFileEntry(project.getLocation().removeLastSegments(2).append("include-file-with-dashes"), 0), entries.get(4));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Parse variations of -macros options.
|
|
|
|
@ -820,22 +748,16 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/macro.file").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CMacroFileEntry expected = new CMacroFileEntry(path, 0);
|
|
|
|
|
CMacroFileEntry expected = new CMacroFileEntry("/macro.file", 0);
|
|
|
|
|
CMacroFileEntry entry = (CMacroFileEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
|
assertEquals(expected.getValue(), entry.getValue());
|
|
|
|
|
assertEquals(expected.getKind(), entry.getKind());
|
|
|
|
|
assertEquals(expected.getFlags(), entry.getFlags());
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/macro.file with spaces").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CMacroFileEntry expected = new CMacroFileEntry(path, 0);
|
|
|
|
|
CMacroFileEntry entry = (CMacroFileEntry)entries.get(1);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assertEquals(new CMacroFileEntry("/macro.file with spaces", 0), entries.get(1));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -865,22 +787,15 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CLibraryPathEntry expected = new CLibraryPathEntry(path, 0);
|
|
|
|
|
CLibraryPathEntry expected = new CLibraryPathEntry("/path0", 0);
|
|
|
|
|
CLibraryPathEntry entry = (CLibraryPathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected.getName(), entry.getName());
|
|
|
|
|
assertEquals(expected.getValue(), entry.getValue());
|
|
|
|
|
assertEquals(expected.getKind(), entry.getKind());
|
|
|
|
|
assertEquals(expected.getFlags(), entry.getFlags());
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/path with spaces").setDevice(project.getLocation().getDevice());
|
|
|
|
|
CLibraryPathEntry expected = new CLibraryPathEntry(path, 0);
|
|
|
|
|
CLibraryPathEntry entry = (CLibraryPathEntry)entries.get(1);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assertEquals(new CLibraryPathEntry("/path with spaces", 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -953,20 +868,12 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
String device = project.getLocation().getDevice();
|
|
|
|
|
// + " -I/path0 "
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/path0").setDevice(device), 0), entries.get(0));
|
|
|
|
|
// + " -I /path1 "
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/path1").setDevice(device), 0), entries.get(1));
|
|
|
|
|
// + " -I\"/path with spaces\""
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/path with spaces").setDevice(device), 0), entries.get(2));
|
|
|
|
|
// + " -DMACRO1=value"
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path1", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path with spaces", 0), entries.get(2));
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO1", "value", 0), entries.get(3));
|
|
|
|
|
// + " -DMACRO2=\"value with spaces\""
|
|
|
|
|
assertEquals(new CMacroEntry("MACRO2", "value with spaces", 0), entries.get(4));
|
|
|
|
|
// + " -L/usr/lib"
|
|
|
|
|
assertEquals(new CLibraryPathEntry(new Path("/usr/lib").setDevice(device), 0), entries.get(5));
|
|
|
|
|
// + " -ldomain"
|
|
|
|
|
assertEquals(new CLibraryPathEntry("/usr/lib", 0), entries.get(5));
|
|
|
|
|
assertEquals(new CLibraryFileEntry("libdomain.a", 0), entries.get(6));
|
|
|
|
|
assertEquals(7, entries.size());
|
|
|
|
|
}
|
|
|
|
@ -1019,13 +926,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Parsing of absolute path to the file being compiled where provider is global.
|
|
|
|
@ -1053,12 +957,8 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(null, file, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(file.getParent().getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(null, file, languageId).get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(file.getParent().getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), parser.getSettingEntries(null, file, languageId).get(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1090,31 +990,14 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
// in single quotes
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file1, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file1, languageId).get(0));
|
|
|
|
|
// in double quotes
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file2, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file2, languageId).get(0));
|
|
|
|
|
// Unix EOL
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file3, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file3, languageId).get(0));
|
|
|
|
|
// Windows EOL
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file4, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file4, languageId).get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1150,13 +1033,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(path0, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file, languageId).get(0));
|
|
|
|
|
// Information from build output should take precedence over build dir
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), parser.getSettingEntries(cfgDescription, file, languageId).get(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1186,24 +1065,17 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file0, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file1, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file2, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
CIncludePathEntry entry = (CIncludePathEntry)entries.get(0);
|
|
|
|
|
assertEquals(expected, entry);
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1273,14 +1145,12 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
// check that relative paths are relative to CWD which is the location of the project
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getLocation().removeLastSegments(1), 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludePathEntry(folderComposite.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(3));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test various relative paths provided in options without resolving.
|
|
|
|
@ -1313,12 +1183,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(".", 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry("..", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry("Folder", 0), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Ensure that duplicate paths are ignored.
|
|
|
|
@ -1349,11 +1217,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(1, entries.size());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test that working directory supplied by ErrorParserManager is considered.
|
|
|
|
@ -1392,14 +1258,12 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().removeLastSegments(1), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getLocation().removeLastSegments(3), 0), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(3));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().append("MissingFolder"), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(4));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determine working directory basing on file being compiled.
|
|
|
|
@ -1467,12 +1331,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().removeLastSegments(1), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().append("Folder"), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test case when build command indicates impossible working directory and
|
|
|
|
@ -1509,13 +1371,11 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
IPath buildPath = new Path(uriBuildDir.getPath()).setDevice(project.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildPath, 0), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildPath.removeLastSegments(1), 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildPath.append("Folder"), 0), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Simulate mapping of a sub-folder in the project to remote URI.
|
|
|
|
@ -1555,14 +1415,12 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder2.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().append("MissingFolder"), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(3));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/BuildDir/MissingFolder", 0), entries.get(3));
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath().append("MissingFolder2"), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(4));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test mapping folders heuristics - inside a project.
|
|
|
|
@ -1601,18 +1459,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(mappedFolder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Ambiguous/Folder").setDevice(file.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, 0), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Missing/Folder").setDevice(file.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, 0), entries.get(3));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Ambiguous/Folder", 0), entries.get(2));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Missing/Folder", 0), entries.get(3));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1654,17 +1504,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Ambiguous/Folder").setDevice(file.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
IPath path = new Path("/Missing/Folder").setDevice(file.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, 0), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Ambiguous/Folder", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Missing/Folder", 0), entries.get(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1713,12 +1555,8 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(folderInReferencedProject.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
|
|
|
|
|
IPath path = new Path("/Ambiguous/Folder").setDevice(file.getLocation().getDevice());
|
|
|
|
|
assertEquals(new CIncludePathEntry(path, 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Ambiguous/Folder", 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1755,12 +1593,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(dir2.removeLastSegments(1), 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test ".." in symbolic links where the symbolic link is present as relative path.
|
|
|
|
@ -1796,12 +1632,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determine working directory from configuration builder settings.
|
|
|
|
@ -1841,11 +1675,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(includeDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test where working directory from command line disagrees with configuration builder settings.
|
|
|
|
@ -1886,13 +1718,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
assertEquals(new CIncludePathEntry(buildDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(includeDir.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Smoke test when non-C files appear in output, should not choke.
|
|
|
|
|
*/
|
|
|
|
@ -1964,12 +1793,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file, languageId).get(0));
|
|
|
|
|
|
|
|
|
|
// cleanup
|
|
|
|
|
contentType.removeFileSpec("x++", IContentTypeSettings.FILE_EXTENSION_SPEC);
|
|
|
|
@ -1999,12 +1823,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
IPath path0 = new Path("/path0").setDevice(project.getLocation().getDevice());
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
CIncludePathEntry expected = new CIncludePathEntry(path0, 0);
|
|
|
|
|
assertEquals(expected, entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
assertEquals(new CIncludePathEntry("/path0", 0), parser.getSettingEntries(cfgDescription, file, languageId).get(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2039,16 +1858,16 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
parser.shutdown();
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
{
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(new CIncludePathEntry(project.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/Python1025/Include").setDevice(project.getLocation().getDevice()), 0), entries.get(1));
|
|
|
|
|
// "/Python1025/Include" not expected to be there
|
|
|
|
|
assertFalse(new java.io.File("/Python1025/Include").exists());
|
|
|
|
|
assertEquals(new CIncludePathEntry("/Python1025/Include", 0), entries.get(1));
|
|
|
|
|
assertEquals(new CMacroEntry("BOOST_ALL_NO_LIB", "1", 0), entries.get(2));
|
|
|
|
|
assertEquals(new CMacroEntry("BOOST_PYTHON_SOURCE", "", 0), entries.get(3));
|
|
|
|
|
assertEquals(new CMacroEntry("BOOST_PYTHON_STATIC_LIB", "", 0), entries.get(4));
|
|
|
|
|
assertEquals(5, entries.size());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test resource file residing on EFS file-system.
|
|
|
|
@ -2082,12 +1901,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
String device = project.getLocation().getDevice();
|
|
|
|
|
assertEquals(new CIncludePathEntry(folder.getFullPath(), ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED), entries.get(0));
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/Absolute/Folder").setDevice(device), 0), entries.get(1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test mapping entries to EFS.
|
|
|
|
@ -2121,11 +1938,9 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
{
|
|
|
|
|
String device = project.getLocation().getDevice();
|
|
|
|
|
assertEquals(new CIncludePathEntry(new Path("/LocallyMappedTo/Folder").setDevice(device), 0), entries.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test assigning entries on file level.
|
|
|
|
@ -2153,14 +1968,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
|
|
|
|
|
expected.add(new CIncludePathEntry(new Path("/path0").setDevice(project.getLocation().getDevice()), 0));
|
|
|
|
|
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFile = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(expected, entriesFile);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFolder = parser.getSettingEntries(cfgDescription, folder, languageId);
|
|
|
|
|
assertEquals(null, entriesFolder);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesProject = parser.getSettingEntries(cfgDescription, project, languageId);
|
|
|
|
|
assertEquals(null, entriesProject);
|
|
|
|
|
expected.add(new CIncludePathEntry("/path0", 0));
|
|
|
|
|
assertEquals(expected, parser.getSettingEntries(cfgDescription, file, languageId));
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, folder, languageId));
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, project, languageId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2189,14 +2000,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
|
|
|
|
|
expected.add(new CIncludePathEntry(new Path("/path0").setDevice(project.getLocation().getDevice()), 0));
|
|
|
|
|
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFile = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(null, entriesFile);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFolder = parser.getSettingEntries(cfgDescription, folder, languageId);
|
|
|
|
|
assertEquals(expected, entriesFolder);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesProject = parser.getSettingEntries(cfgDescription, project, languageId);
|
|
|
|
|
assertEquals(null, entriesProject);
|
|
|
|
|
expected.add(new CIncludePathEntry("/path0", 0));
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, file, languageId));
|
|
|
|
|
assertEquals(expected, parser.getSettingEntries(cfgDescription, folder, languageId));
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, project, languageId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2225,14 +2032,11 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
|
|
|
|
|
expected.add(new CIncludePathEntry(new Path("/path0").setDevice(project.getLocation().getDevice()), 0));
|
|
|
|
|
expected.add(new CIncludePathEntry("/path0", 0));
|
|
|
|
|
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFile = parser.getSettingEntries(cfgDescription, file, languageId);
|
|
|
|
|
assertEquals(null, entriesFile);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesFolder = parser.getSettingEntries(cfgDescription, folder, languageId);
|
|
|
|
|
assertEquals(null, entriesFolder);
|
|
|
|
|
List<ICLanguageSettingEntry> entriesProject = parser.getSettingEntries(cfgDescription, project, languageId);
|
|
|
|
|
assertEquals(expected, entriesProject);
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, file, languageId));
|
|
|
|
|
assertEquals(null, parser.getSettingEntries(cfgDescription, folder, languageId));
|
|
|
|
|
assertEquals(expected, parser.getSettingEntries(cfgDescription, project, languageId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2261,7 +2065,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
|
|
|
|
|
|
|
|
|
|
// check populated entries
|
|
|
|
|
List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
|
|
|
|
|
expected.add(new CIncludePathEntry(new Path("/path0").setDevice(project.getLocation().getDevice()), 0));
|
|
|
|
|
expected.add(new CIncludePathEntry("/path0", 0));
|
|
|
|
|
assertEquals(expected, parser.getSettingEntries(null, project, languageId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|