Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-08-03 16:57:24 +0000
committerStephan Herrmann2012-08-03 16:57:24 +0000
commit260712398cc384c1cfa3301d10f948123df3fb52 (patch)
tree9be249893da69a93b822cacde54801aaa5087217 /testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring
parent7c4fe0c44f3b74ca0bc91ef9f01f7d2cbf2e8aa8 (diff)
downloadorg.eclipse.objectteams-260712398cc384c1cfa3301d10f948123df3fb52.tar.gz
org.eclipse.objectteams-260712398cc384c1cfa3301d10f948123df3fb52.tar.xz
org.eclipse.objectteams-260712398cc384c1cfa3301d10f948123df3fb52.zip
Bug 374841 - [refactoring] pull up does not work among (nested) roles
Diffstat (limited to 'testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring')
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/pullup/PullUpTests.java5
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/B.java4
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/T.java13
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/B.java4
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/T.java17
5 files changed, 43 insertions, 0 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/pullup/PullUpTests.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/pullup/PullUpTests.java
index ff621e282..0c1ada317 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/pullup/PullUpTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/pullup/PullUpTests.java
@@ -327,4 +327,9 @@ public class PullUpTests extends RefactoringTest {
public void testPullUpFieldToImplicitSuperclass() throws Exception {
performPullUp_pass(new String[] { "T", "TSuper" }, new String[] {}, new String[][] { new String[0] }, new String[] { "f" }, true, false, 0, "R");
}
+
+ // Bug 374841 - [refactoring] pull up does not work among (nested) roles
+ public void testPullUpWithReferenceToCallout() throws Exception {
+ performPullUp_pass(new String[] {"T", "B"}, new String[]{"foo"}, new String[][] { new String[0] }, new String[0], true, true, 0, "RSub");
+ }
}
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/B.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/B.java
new file mode 100644
index 000000000..2f8b9309b
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/B.java
@@ -0,0 +1,4 @@
+public class B {
+ String s;
+ String getS() { return s; }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/T.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/T.java
new file mode 100644
index 000000000..b2af6c4fc
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/in/T.java
@@ -0,0 +1,13 @@
+public team class T {
+ protected class RSuper {
+
+ }
+ protected class RSub extends RSuper playedBy B {
+ String getS1() -> get String s;
+ String getS2() -> String getS();
+ void foo()
+ {
+ System.out.println(getS1()+getS2());
+ }
+ }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/B.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/B.java
new file mode 100644
index 000000000..2f8b9309b
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/B.java
@@ -0,0 +1,4 @@
+public class B {
+ String s;
+ String getS() { return s; }
+} \ No newline at end of file
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/T.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/T.java
new file mode 100644
index 000000000..f4ec07e3e
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/testdata/PullUp/testPullUpWithReferenceToCallout/out/T.java
@@ -0,0 +1,17 @@
+public team class T {
+ protected abstract class RSuper {
+
+ void foo()
+ {
+ System.out.println(getS1()+getS2());
+ }
+
+ abstract String getS1();
+
+ abstract String getS2();
+ }
+ protected class RSub extends RSuper playedBy B {
+ String getS1() -> get String s;
+ String getS2() -> String getS();
+ }
+} \ No newline at end of file

Back to the top