diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IndexBindingResolutionBugs.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IndexBindingResolutionBugs.java new file mode 100644 index 00000000000..138dca68cd4 --- /dev/null +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IndexBindingResolutionBugs.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2006 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Markus Schorn - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.internal.pdom.tests; + +import junit.framework.TestSuite; + +import org.eclipse.cdt.core.dom.IPDOMManager; +import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.testplugin.CProjectHelper; +import org.eclipse.core.runtime.Path; + +/** + * For testing PDOM binding resolution + */ +public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase { + + public static TestSuite suite() { + return suite(IndexBindingResolutionBugs.class); + } + + protected void setUp() throws Exception { + cproject= CProjectHelper.createCCProject("ResolveBindingBugs", "bin", IPDOMManager.ID_NO_INDEXER); + header = new Path("header.h"); + references = new Path("references.cpp"); + super.setUp(); + } + + // // header file + // class cl; + // typedef cl* t1; + // typedef t1 t2; + + //// referencing content + // void func(t2 a); + // void func(int b); + // void ref() { + // cl* a; + // func(a); + // } + public void _testBug166954() { + IBinding b0 = getBindingFromASTName("func(a)", 4); + } +} diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java index 80030293330..f43aef543d5 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java @@ -41,6 +41,7 @@ public class PDOMTests extends TestSuite { suite.addTest(IndexCBindingResolutionTest.suite()); suite.addTest(IndexCPPBindingResolutionTest.suite()); + suite.addTest(IndexBindingResolutionBugs.suite()); suite.addTest(CFunctionTests.suite()); suite.addTest(CVariableTests.suite());