1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Clean up some false failures, and handle some changes in the CDT core.

This commit is contained in:
Peter Graves 2003-04-28 15:58:56 +00:00
parent 66a20f07fd
commit fcc7499f2e
2 changed files with 23 additions and 35 deletions

View file

@ -1,3 +1,8 @@
2003-04-28 Peter Graves
* model/org/eclipse/cdt/core/model/tests/BinaryTests:
Updated to remove a few small errors, and deal with some changes
to the core CDT
2003-04-27 John Camelon
Added testBug36932() to DOMTests.
Moved testBugFunctor758() from LokiFailures to DOMTests.

View file

@ -166,11 +166,11 @@ public class BinaryTests extends TestCase {
*
* Called after every test case method.
*/
protected void tearDown() throws CoreException {
// release resources here and clean-up
testProject.getProject().close(null);
testProject.getProject().open(null);
protected void tearDown() throws CoreException, InterruptedException {
/* Let everything settle down before we try to delete the project.
*/
Thread.sleep(500);
CProjectHelper.delete(testProject);
}
@ -192,8 +192,8 @@ public class BinaryTests extends TestCase {
IBinary myBinary;
ICElement[] elements;
ExpectedStrings expSyms;
String[] myStrings = {"atexit", "exit", "_init_libc", "printf", "_fini",
"test.c", "_init","main.c", "_start", "test2.c", "_btext", "errno"};
String[] myStrings = {"atexit", "exit", "_init_libc", "printf",
"test.c", "_init","main.c", "_start", "test2.c", "_btext"};
expSyms=new ExpectedStrings(myStrings);
@ -229,17 +229,9 @@ public class BinaryTests extends TestCase {
IBinary bigBinary,littleBinary;
bigBinary=CProjectHelper.findBinary(testProject, "exebig_g");
littleBinary=CProjectHelper.findBinary(testProject, "test_g");
if (false) {
/****
* Since there is no comment on this function, I have no idea what
* it is ment to do. Once I find out what it's ment to do, I will
* actually write some tests.
* PR23602
*/
assertTrue("Expected 76 Got: " + bigBinary.getData(), bigBinary.getData()==76);
assertTrue("Expected 8, Got: " + littleBinary.getData(), littleBinary.getData()==8);
} else
fail("PR:23602 No docs, can't test");
/* These two test used to fail due to pr 23602 */
assertTrue("Expected 256 Got: " + bigBinary.getData(), bigBinary.getData()==256);
assertTrue("Expected 196, Got: " + littleBinary.getData(), littleBinary.getData()==196);
}
/***
@ -252,8 +244,8 @@ public class BinaryTests extends TestCase {
myBinary=CProjectHelper.findBinary(testProject, "exebig_g");
assertTrue("Expected: x86 Got: " + myBinary.getCPU(),myBinary.getCPU().equals("x86"));
myBinary=CProjectHelper.findBinary(testProject, ppcexefile.toString());
assertTrue("Expected: ppcbe Got: " + myBinary.getCPU(),myBinary.getCPU().equals("ppcbe"));
myBinary=CProjectHelper.findBinary(testProject, ppcexefile.getLocation().lastSegment());
assertTrue("Expected: ppc Got: " + myBinary.getCPU(),myBinary.getCPU().equals("ppc"));
}
@ -319,21 +311,12 @@ public class BinaryTests extends TestCase {
*/
public void testGetText() {
IBinary bigBinary,littleBinary;
bigBinary=CProjectHelper.findBinary(testProject, bigexe.toString());
littleBinary=CProjectHelper.findBinary(testProject, exefile.toString());
if (false) {
/****
* Since there is no comment on this function, I have no idea what
* it is ment to do. Once I find out what it's ment to do, I will
* actually write some tests.
* PR23602
*/
assertTrue("Expected 296, Got: " + bigBinary.getText(), bigBinary.getText()==296);
assertTrue("Expected 296, Got: " + littleBinary.getText(), littleBinary.getText()==296);
} else
fail("PR:23602 No docs, can't test");
}
bigBinary=CProjectHelper.findBinary(testProject, bigexe.getLocation().lastSegment());
littleBinary=CProjectHelper.findBinary(testProject, exefile.getLocation().lastSegment());
/* These two asserts used to fail due to pr 23602 */
assertTrue("Expected 886, Got: " + bigBinary.getText(), bigBinary.getText()==886);
assertTrue("Expected 1223, Got: " + littleBinary.getText(), littleBinary.getText()==1223);
}
/***
* Simple tests for the hadDebug call