1
0
Fork 0
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:
Andrew Ferguson 2008-05-07 16:29:40 +00:00
parent 73b13e3128
commit f0b43c8098

View file

@ -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());
}
}