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

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

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 229d1bef6d10254fce46a39cb652b176c758c452..82df4e81d2d0b79e25884b444451594fdd5a8d26 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
@@ -9,10 +9,11 @@ import 'package:analysis_server/src/services/correction/status.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'package:unittest/unittest.dart';
+import '../../utils.dart';
import 'abstract_rename.dart';
main() {
- groupSep = ' | ';
+ initializeTestEnvironment();
defineReflectiveTests(RenameUnitMemberTest);
}
@@ -42,7 +43,8 @@ typedef NewName(); // existing
refactoring.newName = 'NewName';
RefactoringStatus status = await refactoring.checkFinalConditions();
assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
- expectedMessage: "Library already declares function type alias with name 'NewName'.",
+ expectedMessage:
+ "Library already declares function type alias with name 'NewName'.",
expectedContextSearch: 'NewName(); // existing');
}
@@ -69,7 +71,9 @@ class B extends A {
indexTestUnit('''
class Test {}
''');
- indexUnit('/lib.dart', '''
+ indexUnit(
+ '/lib.dart',
+ '''
library my.lib;
import 'test.dart';
@@ -100,7 +104,8 @@ class A {
refactoring.newName = 'NewName';
RefactoringStatus status = await refactoring.checkFinalConditions();
assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
- expectedMessage: "Reference to renamed class will be shadowed by method 'A.NewName'.",
+ expectedMessage:
+ "Reference to renamed class will be shadowed by method 'A.NewName'.",
expectedContextSearch: 'NewName() {}');
}
@@ -108,7 +113,9 @@ class A {
indexTestUnit('''
class Test {}
''');
- indexUnit('/lib.dart', '''
+ indexUnit(
+ '/lib.dart',
+ '''
library my.lib;
import 'test.dart';
class A {
@@ -132,7 +139,9 @@ class B extends A {
indexTestUnit('''
class Test {}
''');
- indexUnit('/lib.dart', '''
+ indexUnit(
+ '/lib.dart',
+ '''
library my.lib;
import 'test.dart' hide Test;
class A {
@@ -173,7 +182,9 @@ class B extends A {
}
test_checkFinalConditions_shadowsInSubClass_notImportedLib() async {
- indexUnit('/lib.dart', '''
+ indexUnit(
+ '/lib.dart',
+ '''
library my.lib;
class A {
NewName() {}
@@ -232,7 +243,8 @@ class Test {}
refactoring.newName = 'Test';
assertRefactoringStatus(
refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
- expectedMessage: "The new name must be different than the current name.");
+ expectedMessage:
+ "The new name must be different than the current name.");
// OK
refactoring.newName = 'NewName';
assertRefactoringStatusOK(refactoring.checkNewName());

Powered by Google App Engine
This is Rietveld 408576698