| 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();",
|
|
|