From 92c9f39f2232b16b71a36068fda12fc04215a15e Mon Sep 17 00:00:00 2001 From: Peter Graves Date: Wed, 30 Oct 2002 20:55:07 +0000 Subject: [PATCH] Updated to reflect removal of evaluateExpressionToValue from the API and added a Changelog --- .../org.eclipse.cdt.debug.ui.tests/Changelog | 4 ++ .../cdt/debug/core/tests/TargetTests.java | 42 ++----------------- 2 files changed, 8 insertions(+), 38 deletions(-) create mode 100644 debug/org.eclipse.cdt.debug.ui.tests/Changelog diff --git a/debug/org.eclipse.cdt.debug.ui.tests/Changelog b/debug/org.eclipse.cdt.debug.ui.tests/Changelog new file mode 100644 index 00000000000..f8be61f7387 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui.tests/Changelog @@ -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. \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java index bbb7518a9ea..0c489f55a0b 100644 --- a/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java +++ b/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java @@ -17,7 +17,6 @@ import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.cdt.debug.mi.core.*; import org.eclipse.cdt.debug.core.cdi.*; -import org.eclipse.cdt.debug.core.cdi.model.*; /** * @author Peter Graves @@ -92,52 +91,19 @@ public class TargetTests extends TestCase { /*** - * A couple tests to make sure setting breakpoints on functions works as - * expected. + * A couple tests to make sure various evaluations work as expected */ public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException { ICDISession session; ICDIBreakpointManager breaks; - ICDILocation location; - ICDITarget targets[]; session=CDebugHelper.createSession("main"); assertNotNull(session); breaks=session.getBreakpointManager(); assertNotNull(breaks); - - /********************************************************************** - * 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(); - + /*** + * Tests to come + */ }