Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
index 2d01a487c303d0426ced385e56e5b8c1bab62731..5591f3538503b342a8fee5f1357df6e6beb7a631 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -13,13 +13,11 @@ import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import 'abstract_rename.dart';
-
main() {
groupSep = ' | ';
runReflectiveTests(RenameConstructorTest);
}
-
@reflectiveTest
class RenameConstructorTest extends RenameRefactoringTest {
test_checkFinalConditions_hasMember_constructor() async {
@@ -33,9 +31,7 @@ class A {
// check status
refactoring.newName = 'newName';
RefactoringStatus status = await refactoring.checkFinalConditions();
- assertRefactoringStatus(
- status,
- RefactoringProblemSeverity.ERROR,
+ assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
expectedMessage: "Class 'A' already declares constructor with name 'newName'.",
expectedContextSearch: 'newName() {} // existing');
}
@@ -51,9 +47,7 @@ class A {
// check status
refactoring.newName = 'newName';
RefactoringStatus status = await refactoring.checkFinalConditions();
- assertRefactoringStatus(
- status,
- RefactoringProblemSeverity.ERROR,
+ assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
expectedMessage: "Class 'A' already declares method with name 'newName'.",
expectedContextSearch: 'newName() {} // existing');
}
@@ -69,14 +63,12 @@ class A {
// null
refactoring.newName = null;
assertRefactoringStatus(
- refactoring.checkNewName(),
- RefactoringProblemSeverity.FATAL,
+ refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
expectedMessage: "Constructor name must not be null.");
// same
refactoring.newName = 'test';
assertRefactoringStatus(
- refactoring.checkNewName(),
- RefactoringProblemSeverity.FATAL,
+ refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
expectedMessage: "The new name must be different than the current name.");
// empty
refactoring.newName = '';
@@ -189,8 +181,8 @@ main() {
}
void _createConstructorDeclarationRefactoring(String search) {
- ConstructorElement element =
- findNodeElementAtString(search, (node) => node is ConstructorDeclaration);
+ ConstructorElement element = findNodeElementAtString(
+ search, (node) => node is ConstructorDeclaration);
createRenameRefactoringForElement(element);
}
}

Powered by Google App Engine
This is Rietveld 408576698