Index: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java |
=================================================================== |
--- compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java (revision 11396) |
+++ compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java (working copy) |
@@ -7,6 +7,7 @@ |
import com.google.common.base.Joiner; |
import com.google.dart.compiler.DartCompilerListener; |
import com.google.dart.compiler.DartSourceTest; |
+import com.google.dart.compiler.ast.DartAnnotation; |
import com.google.dart.compiler.ast.DartArrayLiteral; |
import com.google.dart.compiler.ast.DartBinaryExpression; |
import com.google.dart.compiler.ast.DartClass; |
@@ -19,7 +20,6 @@ |
import com.google.dart.compiler.ast.DartIdentifier; |
import com.google.dart.compiler.ast.DartIntegerLiteral; |
import com.google.dart.compiler.ast.DartMapLiteral; |
-import com.google.dart.compiler.ast.DartAnnotation; |
import com.google.dart.compiler.ast.DartMethodDefinition; |
import com.google.dart.compiler.ast.DartNode; |
import com.google.dart.compiler.ast.DartPropertyAccess; |
@@ -62,6 +62,20 @@ |
"}")); |
} |
+ public void test_redirectingFactoryConstructor_const() { |
+ parseUnit("redirecting.dart", Joiner.on("\n").join( |
+ "class B {", |
+ " const factory B.n(int x) = A.m;", |
+ "}")); |
+ } |
+ |
+ public void test_redirectingFactoryConstructor_nonConst() { |
+ parseUnit("redirecting.dart", Joiner.on("\n").join( |
+ "class B {", |
+ " factory B.n(int x) = A.m;", |
+ "}")); |
+ } |
+ |
public void test_setter() { |
parseUnit("setter.dart", Joiner.on("\n").join( |
"class G {", |