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

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

Issue 16983008: Fix build after analyzer_experimental changes (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/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 46fa2a1f48d45870301f5b43e377d9d35152b0e0..ff3de63da4632d64d5bc4c9100f8d7b1dd733d8c 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
@@ -162,6 +162,44 @@ public class PropertySemanticProcessorTest extends SemanticProcessorTest {
"}");
}
+ public void test_makeProperty_veto() 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());",
+ " }",
+ "}");
+ context.addNotProperty("Ltest/Test;.isFoo()");
+ context.addNotProperty("Ltest/Test;.setFoo(Z)");
+ runProcessor();
+ assertFormattedSource(
+ "class Test {",
+ " bool _foo = false;",
+ " bool isFoo() => _foo;",
+ " void setFoo(bool v) {",
+ " this._foo = v;",
+ " }",
+ " void main() {",
+ " setFoo(true);",
+ " print(isFoo());",
+ " this.setFoo(false);",
+ " print(this.isFoo());",
+ " }",
+ "}");
+ }
+
public void test_renamePrivateFields() throws Exception {
translateSingleFile(
"// filler filler filler filler filler filler filler filler filler filler",

Powered by Google App Engine
This is Rietveld 408576698