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

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

Issue 250823006: Translate parts of engine.services project. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move to pkg/analysis_services/ Created 6 years, 8 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/correction/CorrectionUtilsTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/CorrectionUtilsTest.java b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/CorrectionUtilsTest.java
index b07a11fb3abfbd78cb986dee597ff0259dbd6bb1..0ec4d61b5e517162a45373e4c396c06919c8eee7 100644
--- a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/CorrectionUtilsTest.java
+++ b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/internal/correction/CorrectionUtilsTest.java
@@ -41,7 +41,6 @@ import com.google.dart.engine.ast.MethodInvocation;
import com.google.dart.engine.ast.PrefixedIdentifier;
import com.google.dart.engine.ast.SimpleIdentifier;
import com.google.dart.engine.ast.Statement;
-import com.google.dart.engine.ast.TypeName;
import com.google.dart.engine.ast.VariableDeclaration;
import com.google.dart.engine.ast.VariableDeclarationStatement;
import com.google.dart.engine.context.AnalysisContext;
@@ -117,7 +116,7 @@ public class CorrectionUtilsTest extends AbstractDartTest {
} catch (IllegalStateException e) {
}
// verify
- verify(change, never()).addEdit(description, edit);
+ verify(change, never()).addEdit(edit, description);
}
public void test_addEdit_badRangeContent() throws Exception {
@@ -134,7 +133,7 @@ public class CorrectionUtilsTest extends AbstractDartTest {
} catch (IllegalStateException e) {
}
// verify
- verify(change, never()).addEdit(description, edit);
+ verify(change, never()).addEdit(edit, description);
}
public void test_addEdit_OK() throws Exception {
@@ -147,7 +146,7 @@ public class CorrectionUtilsTest extends AbstractDartTest {
String description = "desc";
CorrectionUtils.addEdit(getAnalysisContext(), change, description, "234", edit);
// verify
- verify(change).addEdit(description, edit);
+ verify(change).addEdit(edit, description);
}
public void test_allListsEqual_0() throws Exception {
@@ -220,22 +219,12 @@ public class CorrectionUtilsTest extends AbstractDartTest {
CorrectionUtils utils = getTestCorrectionUtils();
// no any node
{
- AstNode node = utils.findNode(Integer.MAX_VALUE, AstNode.class);
+ AstNode node = utils.findNode(Integer.MAX_VALUE);
assertNull(node);
}
- // "String" as SimpleIdentifier
+ // "String" node
{
- SimpleIdentifier node = utils.findNode(findOffset("String "), SimpleIdentifier.class);
- assertNotNull(node);
- }
- // "String" as TypeName
- {
- TypeName node = utils.findNode(findOffset("String "), TypeName.class);
- assertNotNull(node);
- }
- // "String" as part of FunctionDeclaration
- {
- FunctionDeclaration node = utils.findNode(findOffset("String "), FunctionDeclaration.class);
+ AstNode node = utils.findNode(findOffset("String "));
assertNotNull(node);
}
}
@@ -1242,14 +1231,6 @@ public class CorrectionUtilsTest extends AbstractDartTest {
}
}
- public void test_getStringPrefix() throws Exception {
- assertEquals("", CorrectionUtils.getStringPrefix(""));
- assertEquals("", CorrectionUtils.getStringPrefix("01234"));
- assertEquals("", CorrectionUtils.getStringPrefix("0 1234"));
- assertEquals(" ", CorrectionUtils.getStringPrefix(" 01234"));
- assertEquals(" ", CorrectionUtils.getStringPrefix(" 01234"));
- }
-
/**
* Test for {@link CorrectionUtils#getText()}.
*/

Powered by Google App Engine
This is Rietveld 408576698