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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java

Issue 10545159: Fix for 3607 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698