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

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

Issue 16302002: analyzer_experimental snapshot (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/IOSemanticProcessorTest.java
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java
index 0e9e0a1eab4ca0d299e519cdc74808876c109650..df7e94c0a398407e01d006f03a89d121c67c45de 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java
@@ -87,6 +87,23 @@ public class IOSemanticProcessorTest extends SemanticProcessorTest {
"}");
}
+ public void test_URI_create() throws Exception {
+ translateSingleFile(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "package test;",
+ "import java.net.URI;",
+ "public class Test {",
+ " public URI test(String uriString) {",
+ " return URI.create(uriString);",
+ " }",
+ "}");
+ runProcessor();
+ assertFormattedSource(
+ "class Test {",
+ " Uri test(String uriString) => parseUriWithException(uriString);",
+ "}");
+ }
+
public void test_URI_new() throws Exception {
translateSingleFile(
"// filler filler filler filler filler filler filler filler filler filler",
@@ -98,6 +115,9 @@ public class IOSemanticProcessorTest extends SemanticProcessorTest {
" URI result = new URI(null, null, absolutePath, null);",
" return result;",
" }",
+ " public URI newFromStr(String str) {",
+ " return new URI(str);",
+ " }",
" public URI newFromFile(File f) {",
" return f.toURI();",
" }",
@@ -106,9 +126,10 @@ public class IOSemanticProcessorTest extends SemanticProcessorTest {
assertFormattedSource(
"class Test {",
" Uri newFromPath(String absolutePath) {",
- " Uri result = new Uri.fromComponents(path: absolutePath);",
+ " Uri result = new Uri(path: absolutePath);",
" return result;",
" }",
+ " Uri newFromStr(String str) => parseUriWithException(str);",
" Uri newFromFile(JavaFile f) => f.toURI();",
"}");
}

Powered by Google App Engine
This is Rietveld 408576698