mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 17:25:38 +02:00
Testcase for members of class specializations, bug 248927.
This commit is contained in:
parent
a33b8d111f
commit
407f89f372
1 changed files with 19 additions and 0 deletions
|
@ -1489,4 +1489,23 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa
|
|||
IBinding charInst2= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(IBasicType.t_char, 0))});
|
||||
assertSame(charInst1, charInst2);
|
||||
}
|
||||
|
||||
|
||||
// template<typename T> class XT {
|
||||
// public: void method() {};
|
||||
// };
|
||||
// XT<int> x;
|
||||
|
||||
// void test() {
|
||||
// x.method();
|
||||
// }
|
||||
public void testMethodSpecialization_Bug248927() throws Exception {
|
||||
ICPPMethod m= getBindingFromASTName("method", 6, ICPPMethod.class);
|
||||
assertInstance(m, ICPPSpecialization.class);
|
||||
ICPPClassType ct= m.getClassOwner();
|
||||
assertInstance(ct, ICPPTemplateInstance.class);
|
||||
ICPPMethod[] ms= ct.getDeclaredMethods();
|
||||
assertEquals(1, ms.length);
|
||||
assertEquals(m, ms[0]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue