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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/refactoring/ExtractMethodRefactoringImplTest.java

Issue 587743002: Version 1.7.0-dev.3.2 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 3 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: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/refactoring/ExtractMethodRefactoringImplTest.java
===================================================================
--- editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/refactoring/ExtractMethodRefactoringImplTest.java (revision 40507)
+++ editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/refactoring/ExtractMethodRefactoringImplTest.java (working copy)
@@ -143,6 +143,26 @@
findRangeIdentifier("res() {} // marker"));
}
+ public void test_bad_conflict_topLevel_alreadyDeclaresFunction() throws Exception {
+ parseTestUnit(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "void res() {}",
+ "main() {",
+ "// start",
+ " print(0);",
+ "// end",
+ "}",
+ "");
+ setSelectionFromStartEndComments();
+ createRefactoring();
+ // check conditions
+ assertRefactoringStatus(
+ refactoringStatus,
+ RefactoringStatusSeverity.ERROR,
+ "Library already declares function with name 'res'.",
+ findRangeIdentifier("res() {}"));
+ }
+
// TODO(scheglov) waiting for "library namespace" in Engine
// public void test_bad_conflict_method_willHideTopLevel() throws Exception {
// indexTestUnit(
@@ -176,26 +196,6 @@
//// }
// }
- public void test_bad_conflict_topLevel_alreadyDeclaresFunction() throws Exception {
- parseTestUnit(
- "// filler filler filler filler filler filler filler filler filler filler",
- "void res() {}",
- "main() {",
- "// start",
- " print(0);",
- "// end",
- "}",
- "");
- setSelectionFromStartEndComments();
- createRefactoring();
- // check conditions
- assertRefactoringStatus(
- refactoringStatus,
- RefactoringStatusSeverity.ERROR,
- "Library already declares function with name 'res'.",
- findRangeIdentifier("res() {}"));
- }
-
public void test_bad_conflict_topLevel_willHideInheritedMemberUsage() throws Exception {
indexTestUnit(
"// filler filler filler filler filler filler filler filler filler filler",
@@ -2560,6 +2560,13 @@
assertTestChangeResult(change, makeSource(lines));
}
+ @Override
+ protected void tearDown() throws Exception {
+ refactoring = null;
+ refactoringStatus = null;
+ super.tearDown();
+ }
+
/**
* Creates {@link ExtractMethodRefactoring} in {@link #refactoring}.
*/

Powered by Google App Engine
This is Rietveld 408576698