Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-01-22 05:42:01 +0000
committerSergey Prigogin2013-01-23 17:35:19 +0000
commit7024a0c552bd934234f36507e257e30542fa74fa (patch)
treee9616ae1c7692634f662d9bf13c9f91dad5c8340
parentf2b397871dfd846d3b48c706c8bf1303673a6d3f (diff)
downloadorg.eclipse.cdt-7024a0c552bd934234f36507e257e30542fa74fa.tar.gz
org.eclipse.cdt-7024a0c552bd934234f36507e257e30542fa74fa.tar.xz
org.eclipse.cdt-7024a0c552bd934234f36507e257e30542fa74fa.zip
Bug 398696. Failing test case.
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java26
1 files changed, 11 insertions, 15 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
index 6c40e6998cb..b8d2a21ffb2 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
@@ -44,6 +44,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
import org.eclipse.cdt.core.dom.ast.IBasicType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IField;
import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IFunctionType;
@@ -55,6 +56,7 @@ import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.core.dom.ast.IVariable;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
@@ -7005,13 +7007,6 @@ public class AST2TemplateTests extends AST2BaseTest {
parseAndCheckBindings();
}
- // template<typename T, unsigned n> struct A {};
- //
- // template<typename T>
- // struct A<T, 0> {
- // static void m();
- // };
- //
// template <typename T>
// struct B {
// enum { value = 1 };
@@ -7022,15 +7017,16 @@ public class AST2TemplateTests extends AST2BaseTest {
// enum { id = B<T>::value ? 0 : -1 };
// };
//
- // template<typename T>
- // struct D {
- // typedef A<T, C<T>::id> E;
- // };
- //
// void test() {
- // D<bool>::E::m();
+ // int x = C<bool>::id;
// }
- public void testDependentEnum_398696() throws Exception {
- parseAndCheckBindings();
+ public void _testDependentEnum_398696() throws Exception {
+ BindingAssertionHelper ah = getAssertionHelper();
+ IEnumerator binding = ah.assertNonProblem("C<bool>::id", "id");
+ IBinding owner = binding.getOwner();
+ IValue value = binding.getValue();
+ Long num = value.numericalValue();
+ assertNotNull(num);
+ assertEquals(0, num.longValue());
}
}

Back to the top