Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndrew Niefer2004-10-04 17:25:21 -0400
committerAndrew Niefer2004-10-04 17:25:21 -0400
commit40ae4797e15e3925f769b254785f6774fb56df07 (patch)
tree83b81b319a8182d5feee6f22cb77212e454edd0e /core
parent303494e2845a57cae91312b5b9c4afd235f063ce (diff)
downloadorg.eclipse.cdt-40ae4797e15e3925f769b254785f6774fb56df07.tar.gz
org.eclipse.cdt-40ae4797e15e3925f769b254785f6774fb56df07.tar.xz
org.eclipse.cdt-40ae4797e15e3925f769b254785f6774fb56df07.zip
update regression test framework
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/ContentAssistRegressionTests.java12
-rw-r--r--core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/RegressionTestSuite.java7
-rw-r--r--core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java25
3 files changed, 30 insertions, 14 deletions
diff --git a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/ContentAssistRegressionTests.java b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/ContentAssistRegressionTests.java
index eac8437880b..6a3d685519b 100644
--- a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/ContentAssistRegressionTests.java
+++ b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/ContentAssistRegressionTests.java
@@ -61,10 +61,16 @@ public class ContentAssistRegressionTests extends BaseTestFramework {
return results;
}
- public static Test suite() {
- TestSuite suite = new TestSuite();
+ public static Test suite(){
+ return suite( true );
+ }
+ public static Test suite( boolean cleanup ) {
+ TestSuite suite = new TestSuite("ContentAssistRegressionTests"); //$NON-NLS-1$
suite.addTest( new ContentAssistRegressionTests("testMemberCompletion") ); //$NON-NLS-1$
- suite.addTest( new ContentAssistRegressionTests("cleanupProject") ); //$NON-NLS-1$
+
+ if( cleanup )
+ suite.addTest( new ContentAssistRegressionTests("cleanupProject") ); //$NON-NLS-1$
+
return suite;
}
diff --git a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/RegressionTestSuite.java b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/RegressionTestSuite.java
index 8bd5918cd22..05e7853a033 100644
--- a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/RegressionTestSuite.java
+++ b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/RegressionTestSuite.java
@@ -40,9 +40,10 @@ public class RegressionTestSuite extends TestSuite {
public static Test suite() {
final RegressionTestSuite suite = new RegressionTestSuite();
- suite.addTest( SearchRegressionTests.suite() );
- suite.addTest( ContentAssistRegressionTests.suite() );
-
+ suite.addTest( SearchRegressionTests.suite( false ) );
+ suite.addTest( ContentAssistRegressionTests.suite( false ) );
+
+ suite.addTest( new ContentAssistRegressionTests("cleanupProject") ); //$NON-NLS-1$
return suite;
}
}
diff --git a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java
index 4465a3a4dbb..edf4dbbabc8 100644
--- a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java
+++ b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java
@@ -48,10 +48,6 @@ public class SearchRegressionTests extends BaseTestFramework implements ICSearch
scope = SearchEngine.createWorkspaceScope();
resultCollector = new BasicSearchResultCollector();
searchEngine = new SearchEngine();
- try{
- project.setSessionProperty( IndexManager.activationKey, new Boolean( true ) );
- } catch ( CoreException e ) { //boo
- }
}
public SearchRegressionTests()
{
@@ -67,6 +63,10 @@ public class SearchRegressionTests extends BaseTestFramework implements ICSearch
protected void setUp() throws Exception {
super.setUp();
+ try{
+ project.setSessionProperty( IndexManager.activationKey, new Boolean( true ) );
+ } catch ( CoreException e ) { //boo
+ }
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
indexManager.addIndexChangeListener( this );
}
@@ -77,7 +77,10 @@ public class SearchRegressionTests extends BaseTestFramework implements ICSearch
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
indexManager.removeIndexChangeListener( this );
-
+ try{
+ project.setSessionProperty( IndexManager.activationKey, new Boolean( false ) );
+ } catch ( CoreException e ) { //boo
+ }
super.tearDown();
}
@@ -122,10 +125,16 @@ public class SearchRegressionTests extends BaseTestFramework implements ICSearch
fail( "Match at offset " + offset + " in \"" + file.getLocation() + "\" not found." ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
}
- public static Test suite() {
- TestSuite suite = new TestSuite();
+ public static Test suite(){
+ return suite( true );
+ }
+ public static Test suite( boolean cleanup ) {
+ TestSuite suite = new TestSuite("SearchRegressionTests"); //$NON-NLS-1$
suite.addTest( new SearchRegressionTests("testClassDeclarationReference") ); //$NON-NLS-1$
- suite.addTest( new SearchRegressionTests("cleanupProject") ); //$NON-NLS-1$
+
+ if( cleanup )
+ suite.addTest( new SearchRegressionTests( "cleanupProject" ) ); //$NON-NLS-1$
+
return suite;
}

Back to the top