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

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

Issue 18129004: Simplify constructors translation, improve code style. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/SyntaxTranslatorTest.java
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SyntaxTranslatorTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SyntaxTranslatorTest.java
index 69a5be0519c40bebcb1108e1b41579cb346e03f3..86b3cbd8fa263ca02b1735c893741318b8ca750f 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SyntaxTranslatorTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SyntaxTranslatorTest.java
@@ -162,7 +162,7 @@ public class SyntaxTranslatorTest extends AbstractSemanticTest {
assertDartSource(
"",
"/**",
- " * Some \\[ident\\] ignored.",
+ " * Some [ident] ignored.",
" * Second line.",
" */",
"class A {",
@@ -222,15 +222,9 @@ public class SyntaxTranslatorTest extends AbstractSemanticTest {
assertDartSource(
"class A {",
" A.jtd_constructor_0_decl() {",
- " _jtd_constructor_0_impl();",
- " }",
- " _jtd_constructor_0_impl() {",
" print(0);",
" }",
" A.jtd_constructor_1_decl(int p) {",
- " _jtd_constructor_1_impl(p);",
- " }",
- " _jtd_constructor_1_impl(int p) {",
" print(1);",
" }",
"}");
@@ -1215,21 +1209,17 @@ public class SyntaxTranslatorTest extends AbstractSemanticTest {
" this(42);",
" }",
" public A(int p) {",
+ " print(p);",
" }",
"}",
"");
assertDartSource(//
"class A {",
" A.jtd_constructor_0_decl() {",
- " _jtd_constructor_0_impl();",
- " }",
- " _jtd_constructor_0_impl() {",
- " jtdTmp(42);",
+ " thisConstructorRedirection(42);",
" }",
" A.jtd_constructor_1_decl(int p) {",
- " _jtd_constructor_1_impl(p);",
- " }",
- " _jtd_constructor_1_impl(int p) {",
+ " print(p);",
" }",
"}");
}

Powered by Google App Engine
This is Rietveld 408576698