mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 22:45:23 +02:00
207840: add unit test
This commit is contained in:
parent
73b13e3128
commit
f0b43c8098
1 changed files with 15 additions and 0 deletions
|
@ -1174,4 +1174,19 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa
|
|||
|
||||
assertInstance(s1.getClassType().getScope(), ICPPTemplateScope.class);
|
||||
}
|
||||
|
||||
// typedef signed int SI;
|
||||
//
|
||||
// template <SI x>
|
||||
// class A {};
|
||||
|
||||
// const SI y= 99;
|
||||
// A<y> ay;
|
||||
public void _testNonTypeTemplateParameter_207840() {
|
||||
ICPPVariable b0= getBindingFromASTName("y>", 1, ICPPVariable.class);
|
||||
ICPPClassType b1= getBindingFromASTName("A<y>", 1, ICPPClassType.class, ICPPTemplateDefinition.class);
|
||||
ICPPTemplateInstance b2= getBindingFromASTName("A<y>", 4, ICPPTemplateInstance.class, ICPPClassType.class);
|
||||
ObjectMap args= b2.getArgumentMap();
|
||||
assertEquals(1, args.size());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue