Skip to content

Commit

Permalink
Unit test WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
SougandhS committed Sep 4, 2024
1 parent 3d24302 commit 0b9d2b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
public static final String BOUND_JRE_PROJECT_NAME = "BoundJRE";
public static final String CLONE_SUFFIX = "Clone";

final String[] LAUNCH_CONFIG_NAMES_1_4 = { "java.io.File", "LargeSourceFile", "LotsOfFields",
final String[] LAUNCH_CONFIG_NAMES_1_4 = { "LargeSourceFile", "LotsOfFields",
"Breakpoints",
"InstanceVariablesTests",
"LocalVariablesTests", "LocalVariableTests2", "StaticVariablesTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@ public ConditionalBreakpointsWithFileClass(String name) {

public void testFileConditionalBreakpointForTrue() throws Exception {
String typeName = "FileConditionSnippet2";
createConditionalLineBreakpoint(374, "java.io.File", "true", true);
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(374, "java.io.File", "true", true);
IJavaThread mainThread = null;
try {
synchronized (this) {
Thread.sleep(10);
mainThread = launchToBreakpoint(typeName);
int hitLine = 0;
assertTrue("Thread should be suspended", mainThread.isSuspended());
hitLine = mainThread.getStackFrames()[0].getLineNumber();
assertEquals("Should've hit", 374, hitLine);
mainThread.resume();
mainThread.terminate();
// bp.delete();
}
Thread.sleep(10);
mainThread = launchToBreakpoint(typeName);
int hitLine = 0;
assertTrue("Thread should be suspended", mainThread.isSuspended());
hitLine = mainThread.getStackFrames()[0].getLineNumber();
assertEquals("Should've hit", 374, hitLine);
mainThread.resume();
mainThread.terminate();
bp.delete();

} finally {
terminateAndRemove(mainThread);
removeAllBreakpoints();
Expand Down

0 comments on commit 0b9d2b2

Please sign in to comment.