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:
parent
b0330a1735
commit
82b60980fe
5 changed files with 145 additions and 12 deletions
|
@ -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
|
* Rapperswil, University of applied sciences and others
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Institute for Software - initial API and implementation
|
* Institute for Software - initial API and implementation
|
||||||
|
* Tom Ball (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.tests.refactoring;
|
package org.eclipse.cdt.ui.tests.refactoring;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestSuite;
|
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.extractfunction.ExtractFunctionTestSuite;
|
||||||
import org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableTestSuite;
|
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.rename.RenameRegressionTests;
|
||||||
import org.eclipse.cdt.ui.tests.refactoring.utils.UtilTestSuite;
|
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 class RefactoringTestSuite extends TestSuite {
|
||||||
|
|
||||||
public static Test suite() throws Exception {
|
public static Test suite() throws Exception {
|
||||||
TestSuite suite = new RefactoringTestSuite();
|
TestSuite suite = new RefactoringTestSuite();
|
||||||
suite.addTest(UtilTestSuite.suite());
|
suite.addTest(UtilTestSuite.suite());
|
||||||
suite.addTest(RenameRegressionTests.suite());
|
suite.addTest(RenameRegressionTests.suite());
|
||||||
suite.addTest(ExtractFunctionTestSuite.suite());
|
suite.addTest(ExtractFunctionTestSuite.suite());
|
||||||
suite.addTest(RefactoringTester.suite("ExtractConstantRefactoringTests", "resources/refactoring/ExtractConstant.rts"));
|
suite.addTest(ExtractConstantTestSuite.suite());
|
||||||
suite.addTest(RefactoringTester.suite("HideMethodRefactoringTests", "resources/refactoring/HideMethod.rts"));
|
suite.addTest(HideMethodTestSuite.suite());
|
||||||
suite.addTest(RefactoringTester.suite("GettersAndSettersTests", "resources/refactoring/GenerateGettersAndSetters.rts"));
|
suite.addTest(GenerateGettersAndSettersTestSuite.suite());
|
||||||
suite.addTest(RefactoringTester.suite("ImplementMethodRefactoringTests", "resources/refactoring/ImplementMethod.rts"));
|
suite.addTest(ImplementMethodTestSuite.suite());
|
||||||
suite.addTest(ExtractLocalVariableTestSuite.suite());
|
suite.addTest(ExtractLocalVariableTestSuite.suite());
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue