Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-05-22 16:24:58 +0000
committerDani Megert2014-05-22 16:24:58 +0000
commita59514bdede8ac8d9eeade9287a87e4c90792124 (patch)
tree55813f7ec9f7e4b23c3fd6105af3c6692403b14d
parent747fb42f4bc1f71c2bb6fc16ceffec0a8cf788d9 (diff)
downloadeclipse.jdt.debug-a59514bdede8ac8d9eeade9287a87e4c90792124.tar.gz
eclipse.jdt.debug-a59514bdede8ac8d9eeade9287a87e4c90792124.tar.xz
eclipse.jdt.debug-a59514bdede8ac8d9eeade9287a87e4c90792124.zip
-rw-r--r--org.eclipse.jdt.debug.tests/testprograms/org/eclipse/debug/tests/targets/HcrClass3.java8
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java15
2 files changed, 12 insertions, 11 deletions
diff --git a/org.eclipse.jdt.debug.tests/testprograms/org/eclipse/debug/tests/targets/HcrClass3.java b/org.eclipse.jdt.debug.tests/testprograms/org/eclipse/debug/tests/targets/HcrClass3.java
index 92ae2c417..c5ceacc46 100644
--- a/org.eclipse.jdt.debug.tests/testprograms/org/eclipse/debug/tests/targets/HcrClass3.java
+++ b/org.eclipse.jdt.debug.tests/testprograms/org/eclipse/debug/tests/targets/HcrClass3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) May 24, 2013 IBM Corporation and others.
+ * Copyright (c) May 24, 2013, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ public class HcrClass3 {
String s = new String("Constructor");
Anon aclass = new Anon() {
public void run() {
- String s = new String("Anon#run()");
+ String s = new String("TEST_RUN3");
}
};
aclass.run();
@@ -31,7 +31,7 @@ public class HcrClass3 {
String s = new String("HcrClass3#run()");
Anon aclass = new Anon() {
public void run() {
- String s = new String("Anon#run()");
+ String s = new String("TEST_RUN1");
}
};
aclass.run();
@@ -41,7 +41,7 @@ public class HcrClass3 {
String s = new String("HcrClass3#run2()");
Anon aclass = new Anon() {
public void run() {
- String s = new String("Anon#run()");
+ String s = new String("TEST_RUN2");
}
};
aclass.run();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
index ca79304e0..c4fe44ae4 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -477,15 +477,16 @@ public class HcrTests extends AbstractDebugTest {
assertTrue("HcrClass3.java does not exist", cu.exists());
IBuffer buffer = cu.getBuffer();
String contents = buffer.getContents();
- int index = contents.indexOf("\"Anon#run()\"");
+ int index = contents.indexOf("\"TEST_RUN1\"");
assertTrue("Could not find code to replace", index > 0);
- String newCode = contents.substring(0, index) + "\"Anon#run\"" + contents.substring(index + 12);
+ String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
thread = (IJavaThread) waiter.waitForEvent();
+ assertNotNull("Thread did not suspend after HCR", thread);
assertTrue("Listener should have been notified", listener.waitNotification());
assertNotNull("HCR should have not failed", listener.target);
assertTrue("the thread should be suspended again after the HCR", thread.isSuspended());
@@ -529,9 +530,9 @@ public class HcrTests extends AbstractDebugTest {
assertTrue("HcrClass3.java does not exist", cu.exists());
IBuffer buffer = cu.getBuffer();
String contents = buffer.getContents();
- int index = contents.indexOf("\"Anon#run()\"");
+ int index = contents.indexOf("\"TEST_RUN2\"");
assertTrue("Could not find code to replace", index > 0);
- String newCode = contents.substring(0, index) + "\"Anon#run\"" + contents.substring(index + 12);
+ String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
@@ -581,9 +582,9 @@ public class HcrTests extends AbstractDebugTest {
assertTrue("HcrClass3.java does not exist", cu.exists());
IBuffer buffer = cu.getBuffer();
String contents = buffer.getContents();
- int index = contents.indexOf("\"Anon#run()\"");
+ int index = contents.indexOf("\"TEST_RUN3\"");
assertTrue("Could not find code to replace", index > 0);
- String newCode = contents.substring(0, index) + "\"Anon#run\"" + contents.substring(index + 12);
+ String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);

Back to the top