From 4a6e26be9ce8da1eb90fcdde590a232a00b57ebd Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Fri, 16 Mar 2007 14:31:36 +0000 Subject: [PATCH] housekeeping on pdomtests --- .../pdom/tests/IndexBindingResolutionBugs.java | 12 ++++++++++++ .../pdom/tests/OverloadsWithinSingleTUTests.java | 6 ++++++ .../internal/pdom/tests/PDOMLocationTests.java | 6 ++++++ .../cdt/internal/pdom/tests/PDOMTests.java | 16 ++++++++-------- 4 files changed, 32 insertions(+), 8 deletions(-) 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 index 071917f9e36..fed79ded68a 100644 --- 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 @@ -20,6 +20,18 @@ import org.eclipse.cdt.core.dom.ast.IBinding; */ public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase { + public static class SingleProject extends IndexBindingResolutionBugs { + public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));} + } + public static class ProjectWithDepProj extends IndexBindingResolutionBugs { + public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));} + } + + public static void addTests(TestSuite suite) { + suite.addTest(suite(SingleProject.class)); + suite.addTest(suite(ProjectWithDepProj.class)); + } + public static TestSuite suite() { return suite(IndexBindingResolutionBugs.class); } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java index cfedcb3def6..dc2081adf58 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java @@ -12,6 +12,8 @@ package org.eclipse.cdt.internal.pdom.tests; import java.util.regex.Pattern; +import junit.framework.TestSuite; + import org.eclipse.cdt.core.dom.ast.IBasicType; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; @@ -30,6 +32,10 @@ import org.eclipse.core.runtime.NullProgressMonitor; public class OverloadsWithinSingleTUTests extends PDOMTestBase { protected PDOM pdom; + public static TestSuite suite() { + return suite(OverloadsWithinSingleTUTests.class); + } + protected void setUp() throws Exception { if (pdom == null) { ICProject project = createProject("overloadsWithinSingleTU"); diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java index 5496d05b001..67988ac974f 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.cdt.internal.pdom.tests; +import junit.framework.Test; + import org.eclipse.cdt.core.dom.IPDOMManager; import org.eclipse.cdt.core.index.IIndexFileLocation; import org.eclipse.cdt.core.index.IndexLocationFactory; @@ -29,6 +31,10 @@ import org.osgi.framework.Bundle; public class PDOMLocationTests extends BaseTestCase { ICProject cproject; + public static Test suite() { + return suite(PDOMLocationTests.class); + } + protected void setUp() throws Exception { cproject= CProjectHelper.createCCProject("PDOMLocationTests"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER); 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 8f231643850..776efe272cb 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 @@ -28,14 +28,14 @@ public class PDOMTests extends TestSuite { suite.addTest(DBPropertiesTests.suite()); suite.addTest(PDOMBugsTest.suite()); suite.addTest(PDOMSearchTest.suite()); - suite.addTestSuite(PDOMLocationTests.class); - suite.addTestSuite(EnumerationTests.class); - suite.addTestSuite(ClassTests.class); - suite.addTestSuite(TypesTests.class); - suite.addTestSuite(IncludesTests.class); - suite.addTestSuite(OverloadsWithinSingleTUTests.class); + suite.addTest(PDOMLocationTests.suite()); + suite.addTest(EnumerationTests.suite()); + suite.addTest(ClassTests.suite()); + suite.addTest(TypesTests.suite()); + suite.addTest(IncludesTests.suite()); + suite.addTest(OverloadsWithinSingleTUTests.suite()); suite.addTest(OverloadsWithinCommonHeaderTests.suite()); - suite.addTestSuite(BTreeTests.class); + suite.addTest(BTreeTests.suite()); suite.addTest(FilesOnReindexTests.suite()); suite.addTest(CPPFieldTests.suite()); @@ -47,7 +47,7 @@ public class PDOMTests extends TestSuite { IndexCBindingResolutionTest.addTests(suite); IndexCPPBindingResolutionTest.addTests(suite); IndexCBindingResolutionBugs.addTests(suite); - suite.addTest(IndexBindingResolutionBugs.suite()); + IndexBindingResolutionBugs.addTests(suite); suite.addTest(CFunctionTests.suite()); suite.addTest(CVariableTests.suite());