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

Unified Diff: tests/compiler/dart2js/unparser_test.dart

Issue 10957060: First stab at parsing redirecting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 2 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
Index: tests/compiler/dart2js/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index 03ac58e0adb42deffefb849a0846063e6c857e36..f1ef3b42d0e8e11984480f4317bf86f0384d1629 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -208,6 +208,20 @@ testCombinators() {
testUnparseTopLevelWithMetadata('export "søhest" hide a,show hide a,show;');
}
+testRedirectingFactoryConstructors() {
+ for (String prefix in ["", "prefix."]) {
+ for (String suffix in ["", ".baz"]) {
+ for (String typeVar in ["", "<T>"]) {
+ for (String constFlag in ["", "const "]) {
+ String declaration =
+ "${constFlag}factory Foo() = ${prefix}Bar${typeVar}$suffix;";
+ testUnparseMember(declaration);
+ }
+ }
+ }
+ }
+}
+
main() {
testSignedConstants();
testGenericTypes();
@@ -225,4 +239,5 @@ main() {
testPart();
testPartOf();
testCombinators();
+ testRedirectingFactoryConstructors();
}

Powered by Google App Engine
This is Rietveld 408576698