| Index: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/PropertySemanticProcessorTest.java
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/PropertySemanticProcessorTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/PropertySemanticProcessorTest.java
|
| index dce56261b559657d3bb648a4ade585e66a8d9dc6..46fa2a1f48d45870301f5b43e377d9d35152b0e0 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/PropertySemanticProcessorTest.java
|
| +++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/processor/PropertySemanticProcessorTest.java
|
| @@ -17,7 +17,7 @@ package com.google.dart.java2dart.processor;
|
| * Test for {@link PropertySemanticProcessor}.
|
| */
|
| public class PropertySemanticProcessorTest extends SemanticProcessorTest {
|
| - public void test_makeProperty() throws Exception {
|
| + public void test_makeProperty_getSet() throws Exception {
|
| translateSingleFile(
|
| "// filler filler filler filler filler filler filler filler filler filler",
|
| "package test;",
|
| @@ -53,6 +53,42 @@ public class PropertySemanticProcessorTest extends SemanticProcessorTest {
|
| "}");
|
| }
|
|
|
| + public void test_makeProperty_isSet() throws Exception {
|
| + translateSingleFile(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "package test;",
|
| + "public class Test {",
|
| + " private boolean foo;",
|
| + " public boolean isFoo() {",
|
| + " return foo;",
|
| + " }",
|
| + " public void setFoo(boolean v) {",
|
| + " this.foo = v;",
|
| + " }",
|
| + " public void main() {",
|
| + " setFoo(true);",
|
| + " print(isFoo());",
|
| + " this.setFoo(false);",
|
| + " print(this.isFoo());",
|
| + " }",
|
| + "}");
|
| + runProcessor();
|
| + assertFormattedSource(
|
| + "class Test {",
|
| + " bool _foo = false;",
|
| + " bool get isFoo => _foo;",
|
| + " void set foo(bool v) {",
|
| + " this._foo = v;",
|
| + " }",
|
| + " void main() {",
|
| + " foo = true;",
|
| + " print(isFoo);",
|
| + " this.foo = false;",
|
| + " print(this.isFoo);",
|
| + " }",
|
| + "}");
|
| + }
|
| +
|
| public void test_makeProperty_override() throws Exception {
|
| translateSingleFile(
|
| "// filler filler filler filler filler filler filler filler filler filler",
|
|
|