mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Updated to reflect removal of evaluateExpressionToValue from the API and added a Changelog
This commit is contained in:
parent
62db38efbd
commit
92c9f39f22
2 changed files with 8 additions and 38 deletions
4
debug/org.eclipse.cdt.debug.ui.tests/Changelog
Normal file
4
debug/org.eclipse.cdt.debug.ui.tests/Changelog
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
2002-10-30 Alain Magloire
|
||||||
|
|
||||||
|
* core/org/eclipse/cdt/debug/core/tests/TargetTests.java: Test number
|
||||||
|
24183 is no longer valid, the method was remove from the CDI API.
|
|
@ -17,7 +17,6 @@ import org.eclipse.core.resources.*;
|
||||||
import org.eclipse.core.runtime.*;
|
import org.eclipse.core.runtime.*;
|
||||||
import org.eclipse.cdt.debug.mi.core.*;
|
import org.eclipse.cdt.debug.mi.core.*;
|
||||||
import org.eclipse.cdt.debug.core.cdi.*;
|
import org.eclipse.cdt.debug.core.cdi.*;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Peter Graves
|
* @author Peter Graves
|
||||||
|
@ -92,52 +91,19 @@ public class TargetTests extends TestCase {
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* A couple tests to make sure setting breakpoints on functions works as
|
* A couple tests to make sure various evaluations work as expected
|
||||||
* expected.
|
|
||||||
*/
|
*/
|
||||||
public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException {
|
public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException {
|
||||||
ICDISession session;
|
ICDISession session;
|
||||||
ICDIBreakpointManager breaks;
|
ICDIBreakpointManager breaks;
|
||||||
ICDILocation location;
|
|
||||||
ICDITarget targets[];
|
|
||||||
session=CDebugHelper.createSession("main");
|
session=CDebugHelper.createSession("main");
|
||||||
assertNotNull(session);
|
assertNotNull(session);
|
||||||
breaks=session.getBreakpointManager();
|
breaks=session.getBreakpointManager();
|
||||||
assertNotNull(breaks);
|
assertNotNull(breaks);
|
||||||
|
|
||||||
|
/***
|
||||||
/**********************************************************************
|
* Tests to come
|
||||||
* Test to make sure if we call ICDITarget.evaluateExpressionToValue
|
|
||||||
* seems to work.
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
location=breaks.createLocation(null, "func1", 0);
|
|
||||||
assertNotNull(location);
|
|
||||||
breaks.setLocationBreakpoint(0, location, null, null);
|
|
||||||
targets=session.getTargets();
|
|
||||||
/* We better only have one target connected to this session or something
|
|
||||||
* is not right...
|
|
||||||
*/
|
*/
|
||||||
assertTrue(targets.length==1);
|
|
||||||
/* Resume the target, this should cause it to run till it hits the
|
|
||||||
* breakpoint
|
|
||||||
*/
|
|
||||||
targets[0].resume();
|
|
||||||
/**
|
|
||||||
* Give the process up to 10 seconds to become either terminated or
|
|
||||||
* suspended. It sould hit the breakponint almost immediatly so we
|
|
||||||
* should only sleep for max 100 ms
|
|
||||||
*/
|
|
||||||
for (int x=0;x<100;x++) {
|
|
||||||
if (targets[0].isTerminated() || targets[0].isSuspended())
|
|
||||||
break;
|
|
||||||
Thread.sleep(100);
|
|
||||||
}
|
|
||||||
assertTrue(targets[0].isSuspended());
|
|
||||||
assertNotNull("PR:24183", targets[0].evaluateExpressionToValue("a"));
|
|
||||||
/* clean up the session */
|
|
||||||
session.terminate();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue