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 struct A {}; - // - // template - // struct A { - // static void m(); - // }; - // // template // struct B { // enum { value = 1 }; @@ -7022,15 +7017,16 @@ public class AST2TemplateTests extends AST2BaseTest { // enum { id = B::value ? 0 : -1 }; // }; // - // template - // struct D { - // typedef A::id> E; - // }; - // // void test() { - // D::E::m(); + // int x = C::id; // } - public void testDependentEnum_398696() throws Exception { - parseAndCheckBindings(); + public void _testDependentEnum_398696() throws Exception { + BindingAssertionHelper ah = getAssertionHelper(); + IEnumerator binding = ah.assertNonProblem("C::id", "id"); + IBinding owner = binding.getOwner(); + IValue value = binding.getValue(); + Long num = value.numericalValue(); + assertNotNull(num); + assertEquals(0, num.longValue()); } }