Lines 19-31
Link Here
|
19 |
ICompilationUnit wc = null; |
19 |
ICompilationUnit wc = null; |
20 |
WorkingCopyOwner owner = null; |
20 |
WorkingCopyOwner owner = null; |
21 |
|
21 |
|
|
|
22 |
static { |
23 |
// TESTS_NAMES = new String[] { "testSecondaryTypes" }; |
24 |
} |
22 |
public static Test suite() { |
25 |
public static Test suite() { |
23 |
if (false) { |
26 |
return buildTestSuite(ResolveTests.class); |
24 |
TestSuite suite = new Suite(ResolveTests.class.getName()); |
|
|
25 |
suite.addTest(new ResolveTests("testLocalNameForClassFile")); |
26 |
return suite; |
27 |
} |
28 |
return new Suite(ResolveTests.class); |
29 |
} |
27 |
} |
30 |
|
28 |
|
31 |
public ResolveTests(String name) { |
29 |
public ResolveTests(String name) { |
Lines 1620-1623
Link Here
|
1620 |
} |
1618 |
} |
1621 |
} |
1619 |
} |
1622 |
} |
1620 |
} |
|
|
1621 |
/** |
1622 |
* Bug 120350: [model] Secondary type not found by code resolve |
1623 |
* @throws JavaModelException |
1624 |
*/ |
1625 |
public void testSecondaryTypes() throws JavaModelException { |
1626 |
waitUntilIndexesReady(); |
1627 |
ICompilationUnit cu = getCompilationUnit("Resolve", "src", "b120350", "X.java"); |
1628 |
String str = cu.getSource(); |
1629 |
int start = str.indexOf("Secondary"); |
1630 |
int length = "Secondary".length(); |
1631 |
IJavaElement[] elements = cu.codeSelect(start, length); |
1632 |
assertElementsEqual( |
1633 |
"Unexpected elements", |
1634 |
"Secondary [in Test.java [in b120350 [in src [in Resolve]]]]", |
1635 |
elements |
1636 |
); |
1637 |
} |
1623 |
} |
1638 |
} |