| Index: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| ===================================================================
|
| --- compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java (revision 8615)
|
| +++ compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java (working copy)
|
| @@ -20,7 +20,6 @@
|
| import com.google.dart.compiler.ast.DartMethodDefinition;
|
| import com.google.dart.compiler.ast.DartNode;
|
| import com.google.dart.compiler.ast.DartPropertyAccess;
|
| -import com.google.dart.compiler.ast.DartReturnStatement;
|
| import com.google.dart.compiler.ast.DartStatement;
|
| import com.google.dart.compiler.ast.DartStringInterpolation;
|
| import com.google.dart.compiler.ast.DartStringLiteral;
|
| @@ -35,6 +34,26 @@
|
|
|
| public class SyntaxTest extends AbstractParserTest {
|
|
|
| + public void test_getter() {
|
| + DartUnit unit = parseUnit("getter.dart", Joiner.on("\n").join(
|
| + "class G {",
|
| + " // Old getter syntax",
|
| + " int get g1() => 1;",
|
| + " // New getter syntax",
|
| + " int get g2 => 2;",
|
| + "}"));
|
| + }
|
| +
|
| + public void test_setter() {
|
| + DartUnit unit = parseUnit("setter.dart", Joiner.on("\n").join(
|
| + "class G {",
|
| + " // Old setter syntax",
|
| + " void set g1(int v) {}",
|
| + " // New setter syntax",
|
| + " void set g2=(int v) {}",
|
| + "}"));
|
| + }
|
| +
|
| /**
|
| * There was bug when "identA.identB" always considered as constructor declaration. But it can be
|
| * constructor only if "identA" is name of enclosing class.
|
|
|