mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Cosmetics.
This commit is contained in:
parent
636fd192ac
commit
b937c5c50b
2 changed files with 6 additions and 9 deletions
|
@ -38,28 +38,26 @@ public class HideMethodRefactoringTest extends RefactoringTest {
|
|||
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
|
||||
IFile refFile = project.getFile(fileWithSelection);
|
||||
CRefactoring refactoring = new HideMethodRefactoring(refFile,selection, null, cproject);
|
||||
RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
|
||||
if(errors > 0) {
|
||||
if (errors > 0) {
|
||||
assertConditionsError(checkInitialConditions, errors);
|
||||
}else if(fatalerrors > 0) {
|
||||
} else if (fatalerrors > 0) {
|
||||
assertConditionsError(checkInitialConditions, errors);
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
assertConditionsOk(checkInitialConditions);
|
||||
}
|
||||
|
||||
Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
|
||||
RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
|
||||
if(warnings > 0){
|
||||
if (warnings > 0) {
|
||||
assertConditionsWarning(finalConditions, warnings);
|
||||
}else{
|
||||
} else {
|
||||
assertConditionsOk(finalConditions);
|
||||
}
|
||||
createChange.perform(NULL_PROGRESS_MONITOR);
|
||||
|
||||
compareFiles(fileMap);
|
||||
}
|
||||
|
||||
|
@ -68,6 +66,5 @@ public class HideMethodRefactoringTest extends RefactoringTest {
|
|||
warnings = new Integer(refactoringProperties.getProperty("warnings", "0")).intValue(); //$NON-NLS-1$//$NON-NLS-2$
|
||||
errors = new Integer(refactoringProperties.getProperty("errors", "0")).intValue(); //$NON-NLS-1$//$NON-NLS-2$
|
||||
fatalerrors = new Integer(refactoringProperties.getProperty("fatalerrors", "0")).intValue(); //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class HideMethodTestSuite extends TestSuite {
|
|||
suite.addTest(RefactoringTester.suite("HideMethodRefactoringTests",
|
||||
"resources/refactoring/HideMethod.rts"));
|
||||
suite.addTest(RefactoringTester.suite("HideMethodRefactoringHistoryTests",
|
||||
"resources/refactoring/HideMethodHistory.rts"));
|
||||
"resources/refactoring/HideMethodHistory.rts"));
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue