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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java

Issue 10919203: Issue 5044. Make all abstract fields resolve to setter or getter methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/bindings/BindingUtils.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
index fe8e6eb27a191403527e69fe266c617f10c722b0..3f101a77f1eda3b38ae070c37b091b073b5ad797 100644
--- a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
@@ -369,6 +369,23 @@ public class DartElementLocatorTest extends TestCase {
3);
}
+ public void test_Function_getter() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "get test => 0;",
+ "set test(x) {}",
+ "main() {",
+ " process( test );",
+ "}",
+ ""),
+ "test );",
+ DartFunction.class,
+ "test => 0;",
+ 4);
+ }
+
public void test_Function_onDeclaration() throws Exception {
testElementLocator(
formatLines(
@@ -400,6 +417,23 @@ public class DartElementLocatorTest extends TestCase {
4);
}
+ public void test_Function_setter() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "get test => 0;",
+ "set test(x) {}",
+ "main() {",
+ " test = 0;",
+ "}",
+ ""),
+ "test = 0;",
+ DartFunction.class,
+ "test(x)",
+ 4);
+ }
+
public void test_LibraryUnit_onPartOf() throws Exception {
TestProject testProject = new TestProject("Test");
try {
@@ -458,8 +492,8 @@ public class DartElementLocatorTest extends TestCase {
"// filler filler filler filler filler filler filler filler filler filler filler",
"process(x) {}",
"class A {",
- " int get test() {",
- " }",
+ " get test() {}",
+ " set test(x) {}",
"}",
""),
"est() {",
@@ -474,8 +508,8 @@ public class DartElementLocatorTest extends TestCase {
"// filler filler filler filler filler filler filler filler filler filler filler",
"process(x) {}",
"class A {",
- " int get test() {",
- " }",
+ " get test() {}",
+ " set test(x) {}",
"}",
"f() {",
" A a = new A();",
@@ -530,8 +564,8 @@ public class DartElementLocatorTest extends TestCase {
"// filler filler filler filler filler filler filler filler filler filler filler",
"process(x) {}",
"class A {",
- " void set test(x) {",
- " }",
+ " get test() {}",
+ " set test(x) {}",
"}",
""),
"est(x) {",
@@ -545,8 +579,8 @@ public class DartElementLocatorTest extends TestCase {
formatLines(
"// filler filler filler filler filler filler filler filler filler filler filler",
"class A {",
- " void set test(x) {",
- " }",
+ " get test() {}",
+ " set test(x) {}",
"}",
"f() {",
" A a = new A();",
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/bindings/BindingUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698