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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImplTest.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. 2 * Copyright (c) 2013, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 /** 1045 /**
1046 * Checks that all conditions are <code>OK</code> and applying {@link Change} to the 1046 * Checks that all conditions are <code>OK</code> and applying {@link Change} to the
1047 * {@link #testUnit} is same source as given lines. 1047 * {@link #testUnit} is same source as given lines.
1048 */ 1048 */
1049 protected final void assertSuccessfulRefactoring(String... lines) throws Excep tion { 1049 protected final void assertSuccessfulRefactoring(String... lines) throws Excep tion {
1050 assertRefactoringStatus(refactoringStatus, RefactoringStatusSeverity.OK, nul l); 1050 assertRefactoringStatus(refactoringStatus, RefactoringStatusSeverity.OK, nul l);
1051 Change change = refactoring.createChange(pm); 1051 Change change = refactoring.createChange(pm);
1052 assertTestChangeResult(change, makeSource(lines)); 1052 assertTestChangeResult(change, makeSource(lines));
1053 } 1053 }
1054 1054
1055 @Override
1056 protected void tearDown() throws Exception {
1057 refactoring = null;
1058 refactoringStatus = null;
1059 super.tearDown();
1060 }
1061
1055 /** 1062 /**
1056 * Asserts that {@link refactoringStatus} has fatal error caused by selection. 1063 * Asserts that {@link refactoringStatus} has fatal error caused by selection.
1057 */ 1064 */
1058 private void assert_fatalError_selection() throws Exception { 1065 private void assert_fatalError_selection() throws Exception {
1059 RefactoringStatus status = refactoring.checkInitialConditions(pm); 1066 RefactoringStatus status = refactoring.checkInitialConditions(pm);
1060 assertRefactoringStatus( 1067 assertRefactoringStatus(
1061 status, 1068 status,
1062 RefactoringStatusSeverity.FATAL, 1069 RefactoringStatusSeverity.FATAL,
1063 "Expression must be selected to activate this refactoring."); 1070 "Expression must be selected to activate this refactoring.");
1064 } 1071 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 } 1106 }
1100 1107
1101 /** 1108 /**
1102 * Sets selection to the start of the first occurrence of the given string. 1109 * Sets selection to the start of the first occurrence of the given string.
1103 */ 1110 */
1104 private void setSelectionString(String pattern) { 1111 private void setSelectionString(String pattern) {
1105 selectionStart = findOffset(pattern); 1112 selectionStart = findOffset(pattern);
1106 selectionEnd = findEnd(pattern); 1113 selectionEnd = findEnd(pattern);
1107 } 1114 }
1108 } 1115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698