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

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

Issue 485083004: Make RefactoringStatus a collection of generated RefactoringProblems. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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_unit_member_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
index 72baf7fbee98e78bd6953699aaf06f35811c1fa5..276ef5dd05f8a8ae48e6ace01e97bc808a4ee4d3 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
@@ -4,7 +4,7 @@
library test.services.refactoring.rename_unit_member;
-import 'package:analysis_server/src/services/correction/status.dart';
+import 'package:analysis_server/src/protocol2.dart';
import 'package:analysis_testing/reflective_tests.dart';
import 'package:unittest/unittest.dart';
@@ -50,7 +50,7 @@ class NewName {} // existing
return refactoring.checkFinalConditions().then((status) {
assertRefactoringStatus(
status,
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Library already declares class with name 'NewName'.",
expectedContextSearch: 'NewName {} // existing');
});
@@ -67,7 +67,7 @@ typedef NewName(); // existing
return refactoring.checkFinalConditions().then((status) {
assertRefactoringStatus(
status,
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage:
"Library already declares function type alias with name 'NewName'.",
expectedContextSearch: 'NewName(); // existing');
@@ -90,7 +90,7 @@ class A {
return refactoring.checkFinalConditions().then((status) {
assertRefactoringStatus(
status,
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage:
"Reference to renamed class will be shadowed by method 'A.NewName'.",
expectedContextSearch: 'NewName() {}');
@@ -115,7 +115,7 @@ class B extends A {
return refactoring.checkFinalConditions().then((status) {
assertRefactoringStatus(
status,
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Renamed class will shadow method 'A.NewName'.",
expectedContextSearch: 'NewName(); // super-ref');
});
@@ -143,7 +143,7 @@ class B extends A {
return refactoring.checkFinalConditions().then((status) {
assertRefactoringStatus(
status,
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Renamed class will shadow method 'A.NewName'.");
});
}
@@ -224,19 +224,19 @@ class Test {}
refactoring.newName = null;
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Class name must not be null.");
// empty
refactoring.newName = '';
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Class name must not be empty.");
// same
refactoring.newName = 'Test';
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.FATAL,
+ RefactoringProblemSeverity.FATAL,
expectedMessage: "The new name must be different than the current name.");
// OK
refactoring.newName = 'NewName';
@@ -252,13 +252,13 @@ test() {}
refactoring.newName = null;
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Function name must not be null.");
// empty
refactoring.newName = '';
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Function name must not be empty.");
// OK
refactoring.newName = 'newName';
@@ -274,7 +274,7 @@ typedef Test();
refactoring.newName = null;
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Function type alias name must not be null.");
// OK
refactoring.newName = 'NewName';
@@ -290,13 +290,13 @@ var test;
refactoring.newName = null;
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Variable name must not be null.");
// empty
refactoring.newName = '';
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Variable name must not be empty.");
// OK
refactoring.newName = 'newName';
@@ -312,13 +312,13 @@ const TEST = 0;
refactoring.newName = null;
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Constant name must not be null.");
// empty
refactoring.newName = '';
assertRefactoringStatus(
refactoring.checkNewName(),
- RefactoringStatusSeverity.ERROR,
+ RefactoringProblemSeverity.ERROR,
expectedMessage: "Constant name must not be empty.");
// OK
refactoring.newName = 'NEW_NAME';

Powered by Google App Engine
This is Rietveld 408576698