mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fixed unit test for testGetChildren in BinaryTest
This commit is contained in:
parent
7ed318908d
commit
5598a1537e
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2003-10-20 David Inglis
|
||||
|
||||
use project owner ID in plugin class
|
||||
* build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java
|
||||
|
||||
set gnu elf parser since it can read the debug info.
|
||||
* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
|
||||
|
||||
2003-10-01 Andrew Niefer
|
||||
added testBug43951 to CompleteParseASTTest
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ public class StandardBuildTests extends TestCase {
|
|||
try {
|
||||
project = createProject(PROJECT_NAME);
|
||||
// Convert the new project to a standard make project
|
||||
CCorePlugin.getDefault().convertProjectToCC(project, new NullProgressMonitor(), MakeCorePlugin.getUniqueIdentifier() + ".make");
|
||||
CCorePlugin.getDefault().convertProjectToCC(project, new NullProgressMonitor(), MakeCorePlugin.MAKE_PROJECT_ID);
|
||||
MakeProjectNature.addNature(project, null);
|
||||
} catch (CoreException e) {
|
||||
fail("StandardBuildTest testProjectCreation failed creating project: " + e.getLocalizedMessage());
|
||||
|
|
|
@ -12,6 +12,8 @@ import java.io.FileNotFoundException;
|
|||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ICDescriptor;
|
||||
import org.eclipse.cdt.core.model.IBinary;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
|
@ -101,6 +103,16 @@ public class BinaryTests extends TestCase {
|
|||
*/
|
||||
|
||||
testProject=CProjectHelper.createCProject("filetest", "none");
|
||||
|
||||
// since our test require that we can read the debug info from the exe whne must set the GNU elf
|
||||
// binary parser since the default (generic elf binary parser) does not do this.
|
||||
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(testProject.getProject());
|
||||
desc.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
|
||||
desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, "org.eclipse.cdt.core.GNU_ELF");
|
||||
|
||||
// Reset the binary parser the paths may have change.
|
||||
CCorePlugin.getDefault().getCoreModel().resetBinaryParser(testProject.getProject());
|
||||
|
||||
if (testProject==null)
|
||||
fail("Unable to create project");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue