mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
Ensure project is removed after test
Contributed by STMicroelectronics Change-Id: I2d944bb2d2e2704bcc248d6058475d247318f327 Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
38ff9d67ea
commit
5c15ff72a2
1 changed files with 100 additions and 92 deletions
|
@ -574,6 +574,7 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
|
||||||
public void testMacroEntries() throws Exception {
|
public void testMacroEntries() throws Exception {
|
||||||
final String projectName = "test3";
|
final String projectName = "test3";
|
||||||
IProject project = createProject(projectName);
|
IProject project = createProject(projectName);
|
||||||
|
try {
|
||||||
CoreModel coreModel = CoreModel.getDefault();
|
CoreModel coreModel = CoreModel.getDefault();
|
||||||
ICProjectDescription des = coreModel.getProjectDescription(project);
|
ICProjectDescription des = coreModel.getProjectDescription(project);
|
||||||
assertNull("detDescription1 returned not null!", des);
|
assertNull("detDescription1 returned not null!", des);
|
||||||
|
@ -621,7 +622,8 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
|
||||||
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
|
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
|
||||||
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
|
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
|
||||||
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
|
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
|
||||||
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), false));
|
assertEquals(cfgDes.getRootFolderDescription(),
|
||||||
|
cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), false));
|
||||||
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
|
assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
|
||||||
assertEquals(null, cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), true));
|
assertEquals(null, cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), true));
|
||||||
|
|
||||||
|
@ -631,8 +633,8 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
|
||||||
|
|
||||||
if (isPrint) {
|
if (isPrint) {
|
||||||
for (int i = 0; i < entries.length; i++) {
|
for (int i = 0; i < entries.length; i++) {
|
||||||
System.out
|
System.out.println(
|
||||||
.println("name = \"" + entries[i].getName() + "\", value = \"" + entries[i].getValue() + "\"");
|
"name = \"" + entries[i].getName() + "\", value = \"" + entries[i].getValue() + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -655,12 +657,16 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(found);
|
assertTrue(found);
|
||||||
|
} finally {
|
||||||
|
project.delete(true, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testActiveCfg() throws Exception {
|
public void testActiveCfg() throws Exception {
|
||||||
final String projectName = "test8";
|
final String projectName = "test8";
|
||||||
|
|
||||||
IProject project = createProject(projectName, "cdt.managedbuild.target.gnu30.exe");
|
IProject project = createProject(projectName, "cdt.managedbuild.target.gnu30.exe");
|
||||||
|
try {
|
||||||
CoreModel coreModel = CoreModel.getDefault();
|
CoreModel coreModel = CoreModel.getDefault();
|
||||||
|
|
||||||
ICProjectDescription des = coreModel.getProjectDescription(project);
|
ICProjectDescription des = coreModel.getProjectDescription(project);
|
||||||
|
@ -693,7 +699,9 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
|
||||||
|
|
||||||
des = coreModel.getProjectDescription(project);
|
des = coreModel.getProjectDescription(project);
|
||||||
assertEquals(newActiveId, des.getActiveConfiguration().getId());
|
assertEquals(newActiveId, des.getActiveConfiguration().getId());
|
||||||
|
} finally {
|
||||||
|
project.delete(true, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue