1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

FIXED - bug 262670: Added test suites to refactoring packages to ease test development, debugging

https://bugs.eclipse.org/bugs/show_bug.cgi?id=262670
This commit is contained in:
Emanuel Graf 2009-05-27 06:29:15 +00:00
parent b0330a1735
commit 82b60980fe
5 changed files with 145 additions and 12 deletions

View file

@ -1,21 +1,26 @@
/*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences 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:
* 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:
* Institute for Software - initial API and implementation
* Tom Ball (Google)
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodTestSuite;
import org.eclipse.cdt.ui.tests.refactoring.rename.RenameRegressionTests;
import org.eclipse.cdt.ui.tests.refactoring.utils.UtilTestSuite;
@ -24,16 +29,16 @@ import org.eclipse.cdt.ui.tests.refactoring.utils.UtilTestSuite;
*
*/
public class RefactoringTestSuite extends TestSuite {
public static Test suite() throws Exception {
TestSuite suite = new RefactoringTestSuite();
suite.addTest(UtilTestSuite.suite());
suite.addTest(RenameRegressionTests.suite());
suite.addTest(ExtractFunctionTestSuite.suite());
suite.addTest(RefactoringTester.suite("ExtractConstantRefactoringTests", "resources/refactoring/ExtractConstant.rts"));
suite.addTest(RefactoringTester.suite("HideMethodRefactoringTests", "resources/refactoring/HideMethod.rts"));
suite.addTest(RefactoringTester.suite("GettersAndSettersTests", "resources/refactoring/GenerateGettersAndSetters.rts"));
suite.addTest(RefactoringTester.suite("ImplementMethodRefactoringTests", "resources/refactoring/ImplementMethod.rts"));
suite.addTest(ExtractConstantTestSuite.suite());
suite.addTest(HideMethodTestSuite.suite());
suite.addTest(GenerateGettersAndSettersTestSuite.suite());
suite.addTest(ImplementMethodTestSuite.suite());
suite.addTest(ExtractLocalVariableTestSuite.suite());
return suite;
}

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2009 Google, 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:
* Tom Ball (Google) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.extractconstant;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
/**
* Test suite to run just the Extract Constant unit tests.
*
* @author Tom Ball
*/
public class ExtractConstantTestSuite extends TestSuite {
@SuppressWarnings("nls")
public static Test suite() throws Exception {
TestSuite suite = new ExtractConstantTestSuite();
suite.addTest(RefactoringTester.suite("ExtractConstantRefactoringTest",
"resources/refactoring/ExtractConstant.rts"));
return suite;
}
}

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2009 Google, 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:
* Tom Ball (Google) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.gettersandsetters;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
/**
* Test suite to run just the Generate Getters and Setters unit tests.
*
* @author Tom Ball
*/
public class GenerateGettersAndSettersTestSuite extends TestSuite {
@SuppressWarnings("nls")
public static Test suite() throws Exception {
TestSuite suite = new GenerateGettersAndSettersTestSuite();
suite.addTest(RefactoringTester.suite("GenerateGettersAndSettersTest",
"resources/refactoring/GenerateGettersAndSetters.rts"));
return suite;
}
}

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2009 Google, 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:
* Tom Ball (Google) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.hidemethod;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
/**
* Test suite to run just the Hide Method unit tests.
*
* @author Tom Ball
*/
public class HideMethodTestSuite extends TestSuite {
@SuppressWarnings("nls")
public static Test suite() throws Exception {
TestSuite suite = new HideMethodTestSuite();
suite.addTest(RefactoringTester.suite("HideMethodRefactoringTests",
"resources/refactoring/HideMethod.rts"));
return suite;
}
}

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2009 Google, 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:
* Tom Ball - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.implementmethod;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
/**
* Test suite to run just the Implement Method unit tests.
*
* @author Tom Ball
*/
public class ImplementMethodTestSuite extends TestSuite {
@SuppressWarnings("nls")
public static Test suite() throws Exception {
TestSuite suite = new ImplementMethodTestSuite();
suite.addTest(RefactoringTester.suite("ImplementMethodRefactoringTest",
"resources/refactoring/ImplementMethod.rts"));
return suite;
}
}