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

Unified Diff: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java

Issue 14050010: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
index 677a88a3177f886db599b1fb2123461cc91b9455..424fb421cc0d91906d6567dd1949e8399e4ab070 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/ObjectSemanticProcessorTest.java
@@ -792,6 +792,48 @@ public class ObjectSemanticProcessorTest extends SemanticProcessorTest {
"}");
}
+ public void test_String_startsWith() throws Exception {
+ translateSingleFile(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "package test;",
+ "public class Test {",
+ " public boolean main(String s, String prefix, int index) {",
+ " return s.startsWith(prefix, index);",
+ " }",
+ "}");
+ runProcessor();
+ assertFormattedSource(
+ "class Test {",
+ " bool main(String s, String prefix, int index) => JavaString.startsWithBefore(s, prefix, index);",
+ "}");
+ }
+
+ public void test_String_toCharSequence() throws Exception {
+ translateSingleFile(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "package test;",
+ "public class Test {",
+ " void testA(String s) {",
+ " CharSequence cs;",
+ " cs = s;",
+ " }",
+ " void testB(String s) {",
+ " CharSequence cs = s;",
+ " }",
+ "}");
+ runProcessor();
+ assertFormattedSource(
+ "class Test {",
+ " void testA(String s) {",
+ " CharSequence cs;",
+ " cs = new CharSequence(s);",
+ " }",
+ " void testB(String s) {",
+ " CharSequence cs = new CharSequence(s);",
+ " }",
+ "}");
+ }
+
public void test_StringBuilder() throws Exception {
translateSingleFile(
"// filler filler filler filler filler filler filler filler filler filler",

Powered by Google App Engine
This is Rietveld 408576698