mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fixes for call hierarchy tests
This commit is contained in:
parent
2c80cfda68
commit
90b17f0734
3 changed files with 12 additions and 4 deletions
|
@ -241,8 +241,9 @@ public class BaseUITestCase extends BaseTestCase {
|
||||||
final protected TreeItem checkTreeNode(Tree tree, int i0, int i1, String label) {
|
final protected TreeItem checkTreeNode(Tree tree, int i0, int i1, String label) {
|
||||||
TreeItem item= null;
|
TreeItem item= null;
|
||||||
TreeItem root= tree.getItem(i0);
|
TreeItem root= tree.getItem(i0);
|
||||||
for (int i=0; i<200; i++) {
|
for (int i=0; i<400; i++) {
|
||||||
try {
|
try {
|
||||||
|
item= null;
|
||||||
item= root.getItem(i1);
|
item= root.getItem(i1);
|
||||||
if (!"...".equals(item.getText())) {
|
if (!"...".equals(item.getText())) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -551,7 +551,6 @@ public class BasicCallHierarchyTest extends CallHierarchyBaseTest {
|
||||||
checkTreeNode(tree, 0, 0, "main()");
|
checkTreeNode(tree, 0, 0, "main()");
|
||||||
}
|
}
|
||||||
|
|
||||||
// {testStaticFunctions}
|
|
||||||
// void gf();
|
// void gf();
|
||||||
// static void sf() {
|
// static void sf() {
|
||||||
// gf();
|
// gf();
|
||||||
|
@ -623,7 +622,6 @@ public class BasicCallHierarchyTest extends CallHierarchyBaseTest {
|
||||||
checkTreeNode(i1, 0, null);
|
checkTreeNode(i1, 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// {testStaticFunctions}
|
|
||||||
// void gf();
|
// void gf();
|
||||||
// static void sf() {
|
// static void sf() {
|
||||||
// gf();
|
// gf();
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class CallHierarchyBugs extends CallHierarchyBaseTest {
|
||||||
// void SomeClass::ambiguous_impl() {
|
// void SomeClass::ambiguous_impl() {
|
||||||
// ref1= 1;
|
// ref1= 1;
|
||||||
// }
|
// }
|
||||||
|
// void other() {}
|
||||||
|
|
||||||
// #include "SomeClass.h"
|
// #include "SomeClass.h"
|
||||||
// void SomeClass::ambiguous_impl() {
|
// void SomeClass::ambiguous_impl() {
|
||||||
|
@ -112,6 +113,14 @@ public class CallHierarchyBugs extends CallHierarchyBaseTest {
|
||||||
checkTreeNode(chTree, 0, "SomeClass::ambiguous_impl()");
|
checkTreeNode(chTree, 0, "SomeClass::ambiguous_impl()");
|
||||||
checkTreeNode(chTree, 0, 0, "SomeClass::ref1");
|
checkTreeNode(chTree, 0, 0, "SomeClass::ref1");
|
||||||
|
|
||||||
|
// just change the call hierarchy
|
||||||
|
outline= activateView(IPageLayout.ID_OUTLINE);
|
||||||
|
outlineTree= (Tree) getFocusControl(Tree.class, avoid, 8000);
|
||||||
|
checkTreeNode(outlineTree, 2, "other() : void");
|
||||||
|
selectTreeItem(outlineTree, 2);
|
||||||
|
executeCommand(outline, ICEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
|
||||||
|
checkTreeNode(chTree, 0, "other()");
|
||||||
|
|
||||||
openEditor(file2);
|
openEditor(file2);
|
||||||
outline= activateView(IPageLayout.ID_OUTLINE);
|
outline= activateView(IPageLayout.ID_OUTLINE);
|
||||||
outlineTree= (Tree) getFocusControl(Tree.class, outlineTree, 8000);
|
outlineTree= (Tree) getFocusControl(Tree.class, outlineTree, 8000);
|
||||||
|
@ -129,7 +138,7 @@ public class CallHierarchyBugs extends CallHierarchyBaseTest {
|
||||||
|
|
||||||
private void openEditor(IFile file) throws PartInitException {
|
private void openEditor(IFile file) throws PartInitException {
|
||||||
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||||
IDE.openEditor(page, file);
|
IDE.openEditor(page, file, true);
|
||||||
getFocusControl(StyledText.class, 8000);
|
getFocusControl(StyledText.class, 8000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue