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

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

Issue 22285004: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/SemanticTest.java
diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
index c8f1872801ed008b1cc3da6452619b4b5d6e7f70..7d95c4a27225863d84cc4ca5711a298b10eb1e9f 100644
--- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
+++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
@@ -442,6 +442,46 @@ public class SemanticTest extends AbstractSemanticTest {
getFormattedSource(unit));
}
+ // XXX
Brian Wilkerson 2013/08/07 20:31:29 Remove?
+ public void test_classInner6() throws Exception {
+ setFileLines(
+ "test/A.java",
+ toString(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "public class A {",
+ " public class B {",
+ " public B(int p) {}",
+ " void test() {",
+ " outerMethod();",
+ " }",
+ " }",
+ " void outerMethod() {}",
+ " B test2() {",
+ " return new B(42);",
+ " }",
+ "}"));
+ Context context = new Context();
+ context.addSourceFolder(tmpFolder);
+ context.addSourceFiles(tmpFolder);
+ // do translate
+ CompilationUnit unit = context.translate();
+ assertEquals(
+ toString(
+ "class A {",
+ " void outerMethod() {",
+ " }",
+ " A_B test2() => new A_B(this, 42);",
+ "}",
+ "class A_B {",
+ " final A A_this;",
+ " A_B(this.A_this, int p);",
+ " void test() {",
+ " A_this.outerMethod();",
+ " }",
+ "}"),
+ getFormattedSource(unit));
+ }
+
public void test_configureRenameField() throws Exception {
setFileLines(
"test/A.java",
@@ -689,7 +729,7 @@ public class SemanticTest extends AbstractSemanticTest {
CompilationUnit unit = context.translate();
assertEquals(
toString(
- "class Test implements Comparable<Test> {",
+ "class Test implements Enum<Test> {",
" static final Test EOF = new Test_EOF('EOF', 0, 5);",
" static final Test DEF = new Test.con1('DEF', 1);",
" static final List<Test> values = [EOF, DEF];",
@@ -736,7 +776,7 @@ public class SemanticTest extends AbstractSemanticTest {
toString(
"class Test {",
"}",
- "class MyEnum implements Comparable<MyEnum> {",
+ "class MyEnum implements Enum<MyEnum> {",
" static final MyEnum ONE = new MyEnum('ONE', 0);",
" static final MyEnum TWO = new MyEnum('TWO', 1);",
" static final List<MyEnum> values = [ONE, TWO];",
@@ -769,7 +809,7 @@ public class SemanticTest extends AbstractSemanticTest {
CompilationUnit unit = context.translate();
assertEquals(
toString(
- "class Test implements Comparable<Test> {",
+ "class Test implements Enum<Test> {",
" static final Test ONE = new Test('ONE', 0);",
" static final Test TWO = new Test('TWO', 1);",
" static final List<Test> values = [ONE, TWO];",
@@ -809,7 +849,7 @@ public class SemanticTest extends AbstractSemanticTest {
CompilationUnit unit = context.translate();
assertEquals(
toString(
- "class Test implements Comparable<Test> {",
+ "class Test implements Enum<Test> {",
" static final Test ONE = new Test.con1('ONE', 0);",
" static final Test TWO = new Test.withPriority('TWO', 1, 2);",
" static final List<Test> values = [ONE, TWO];",
@@ -1695,7 +1735,7 @@ public class SemanticTest extends AbstractSemanticTest {
CompilationUnit unit = context.translate();
assertEquals(
toString(
- "class A implements Comparable<A> {",
+ "class A implements Enum<A> {",
" static final A ONE = new A('ONE', 0);",
" static final A TWO = new A('TWO', 1);",
" static final List<A> values = [ONE, TWO];",

Powered by Google App Engine
This is Rietveld 408576698