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

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

Issue 16337007: Version 0.5.13.1 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/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
===================================================================
--- editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java (revision 23549)
+++ editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/IOSemanticProcessorTest.java (working copy)
@@ -87,6 +87,23 @@
"}");
}
+ 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 @@
" 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 @@
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