1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-09-19 21:08:44 +00:00
parent 636fd192ac
commit b937c5c50b
2 changed files with 6 additions and 9 deletions

View file

@ -38,28 +38,26 @@ public class HideMethodRefactoringTest extends RefactoringTest {
@Override @Override
protected void runTest() throws Throwable { protected void runTest() throws Throwable {
IFile refFile = project.getFile(fileWithSelection); IFile refFile = project.getFile(fileWithSelection);
CRefactoring refactoring = new HideMethodRefactoring(refFile,selection, null, cproject); CRefactoring refactoring = new HideMethodRefactoring(refFile,selection, null, cproject);
RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR); RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
if(errors > 0) { if (errors > 0) {
assertConditionsError(checkInitialConditions, errors); assertConditionsError(checkInitialConditions, errors);
}else if(fatalerrors > 0) { } else if (fatalerrors > 0) {
assertConditionsError(checkInitialConditions, errors); assertConditionsError(checkInitialConditions, errors);
return; return;
}else { } else {
assertConditionsOk(checkInitialConditions); assertConditionsOk(checkInitialConditions);
} }
Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR); Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR); RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
if(warnings > 0){ if (warnings > 0) {
assertConditionsWarning(finalConditions, warnings); assertConditionsWarning(finalConditions, warnings);
}else{ } else {
assertConditionsOk(finalConditions); assertConditionsOk(finalConditions);
} }
createChange.perform(NULL_PROGRESS_MONITOR); createChange.perform(NULL_PROGRESS_MONITOR);
compareFiles(fileMap); 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$ 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$ 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$ fatalerrors = new Integer(refactoringProperties.getProperty("fatalerrors", "0")).intValue(); //$NON-NLS-1$//$NON-NLS-2$
} }
} }