mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
Test case for bug 361604.
This commit is contained in:
parent
1055cd6604
commit
e65e1eabc1
1 changed files with 27 additions and 5 deletions
|
@ -5470,7 +5470,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
public void testTemplateTemplateParameterMatching_352859() throws Exception {
|
public void testTemplateTemplateParameterMatching_352859() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// template<typename T> T f();
|
// template<typename T> T f();
|
||||||
// template<> int f() {
|
// template<> int f() {
|
||||||
// return 0;
|
// return 0;
|
||||||
|
@ -5482,7 +5482,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
ICPPTemplateInstance inst= bh.assertNonProblem("f() {", 1);
|
ICPPTemplateInstance inst= bh.assertNonProblem("f() {", 1);
|
||||||
assertSame(template, inst.getTemplateDefinition());
|
assertSame(template, inst.getTemplateDefinition());
|
||||||
}
|
}
|
||||||
|
|
||||||
// template<typename T1,typename T2> class A{};
|
// template<typename T1,typename T2> class A{};
|
||||||
// template<typename T1> class A<T1, int>{};
|
// template<typename T1> class A<T1, int>{};
|
||||||
// template<typename T2> class A<int, T2>{};
|
// template<typename T2> class A<int, T2>{};
|
||||||
|
@ -5497,7 +5497,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
public void testExplicitSpecializationOfForbiddenAsImplicit_356818() throws Exception {
|
public void testExplicitSpecializationOfForbiddenAsImplicit_356818() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// struct A {
|
// struct A {
|
||||||
// void f() { }
|
// void f() { }
|
||||||
// };
|
// };
|
||||||
|
@ -5522,14 +5522,14 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
public void testSpecializationOfUsingDeclaration_357293() throws Exception {
|
public void testSpecializationOfUsingDeclaration_357293() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// template<typename T> struct SS {};
|
// template<typename T> struct SS {};
|
||||||
// template<template<typename T, typename S = SS<T> > class Cont>
|
// template<template<typename T, typename S = SS<T> > class Cont>
|
||||||
// Cont<int> f() {}
|
// Cont<int> f() {}
|
||||||
public void testReferenceToParameterOfTemplateTemplateParameter_357308() throws Exception {
|
public void testReferenceToParameterOfTemplateTemplateParameter_357308() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// template <typename...> void f() {}
|
// template <typename...> void f() {}
|
||||||
// void test() {
|
// void test() {
|
||||||
// f();
|
// f();
|
||||||
|
@ -5538,4 +5538,26 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
public void testTemplateArgumentDeductionWithoutParameters_358654() throws Exception {
|
public void testTemplateArgumentDeductionWithoutParameters_358654() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template<bool V, typename T>
|
||||||
|
// struct C {
|
||||||
|
// typedef int s;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// template<typename T>
|
||||||
|
// struct C<false, T> {
|
||||||
|
// typedef T s;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// struct B {
|
||||||
|
// typedef B u;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// typedef C<sizeof(char) == sizeof(int), B> r;
|
||||||
|
// typedef r::s t;
|
||||||
|
// t::u x;
|
||||||
|
public void _testBoolExpressionAsTemplateArgument_361604() throws Exception {
|
||||||
|
final String code= getAboveComment();
|
||||||
|
parseAndCheckBindings(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue